From bdc2de74380bb6e8cf21f7868f67f57f8fad3339 Mon Sep 17 00:00:00 2001 From: Enes Gjikokaj <75257483+Engaming-dev@users.noreply.github.com> Date: Wed, 9 Jun 2021 09:15:20 +0000 Subject: [PATCH] Made the version usable. curently i only have options for 2 number addition. --- main.rb | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/main.rb b/main.rb index bf755c8..785309b 100644 --- a/main.rb +++ b/main.rb @@ -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 \ No newline at end of file + 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 \ No newline at end of file