From: "Manju M." Date: 2011-10-20T22:08:04+09:00 Subject: Re: Switch case with break statement Thank you all for your valuable reply, One solution what I applied already was ### def add() a=5 b=6 return a+b end def sub() a=5 b=6 return a-b end def pro() a=5 b=6 return a*b end loop do printf "Enter \n 1-Addition\n 2-Subtraction\n 3-Multiplication\n 4-Exit\n : " a=STDIN.gets b=a.to_i case b when 1 add() when 2 sub() when 3 pro() when 4 exit else puts "Wrong Entry" end end -- Posted via http://www.ruby-forum.com/.