Skip to content

Commit

Permalink
Made the version usable. curently i only have options for 2 number ad…
Browse files Browse the repository at this point in the history
…dition.
  • Loading branch information
Engaming-dev committed Jun 9, 2021
1 parent beb00dc commit bdc2de7
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@
3 = 4 numbers (doesnt work yet)"
numbers = gets.chomp.to_i
if numbers == 1
puts "what operator are we using?(only + works currently)"
operator = gets.chomp.to_i
if operator == +
puts "What are the numbers used?"
puts "a ="
number_a = gets.chomp.to_i
puts "b ="
number_b = gets.chomp.to_i
final = number_a + number_b
puts "FINAL RESULT: #{final}"
else puts "Invalid."end
else puts "Currently not available."end
puts "what operator are we using?(only plus works currently)"
operator = gets.chomp
if operator == "plus"
puts "Enter your numbers."
number_a = gets.chomp.to_i
number_b = gets.chomp.to_i
final = number_a + number_b
puts "Final result: #{final}"
end
end

0 comments on commit bdc2de7

Please sign in to comment.