Class: Test
- Inherits:
-
Object
- Object
- Test
- Defined in:
- lib/akeel_sir.rb
Instance Method Summary collapse
Instance Method Details
#concat ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/akeel_sir.rb', line 4 def concat print "What is your first name? " name1 = gets.chomp print "What is your last name? " name2 = gets.chomp if name1.to_i == 0 && name2.to_i == 0 puts 'Your full name is ' + (name1 + name2) else puts 'Addition of two numbers is ' + (name1.to_i + name2.to_i).to_s end end |