#!/usr/bin/ruby1.8while true do print "Operand 1: " opd1 = readline.to_f print "Operatia dorita (+, -, *, /): " opr = readline.strip unless %w(+ - * /).include?(opr) then puts "Nu fi arny! Introdu o operatie din cele permise" next end print "Operand 2: " opd2 = readline.to_f puts opd1.send( opr, opd2 ) end
Humour please? Pentru rubinu' matale intelectual primesti ca premiu un ceas cu_rubine...virtuale.. sau un aipod nano rubiniu, ca te stiu fan .... Ender _______________________________________________ RLUG mailing list [email protected] http://lists.lug.ro/mailman/listinfo/rlug
