Skip to content

Commit

Permalink
Added the ability to do 4 number math operations. also added PATCHNOT…
Browse files Browse the repository at this point in the history
…ES.md, where you can see the full changelog of future updates.
  • Loading branch information
Engaming-dev committed Jun 10, 2021
1 parent 59a4561 commit 3871cf6
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 10 deletions.
9 changes: 9 additions & 0 deletions PATCHNOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Patch Notes
This is where you can find info on the latest update/commit.
You cam also find some plans on other updates.
## Patch Notes 1.0.0 pre-release 3
Added the ability to do math operations with 4 numbers.
### Note:
Everything is subject to change. This means that dont expect this to be the final full release of 1.0.0 available with all the new features and tweaks.
## Up Next:
The reimplementation of the old features. I had to delete all the previous code (With some exceptions) to begin developing the new code. Also, I will be merging 1.0.0-dev-preview with master today on github.
33 changes: 23 additions & 10 deletions main.rb
Original file line number Diff line number Diff line change
@@ -1,28 +1,41 @@
puts "basic calculator v.1.0 pre-release 2. NOTE: Program is still in development."
puts "Instructions can be found in the instructions.md file."
puts "Patch Notes can be found in the PATCHNOTES.md file."
puts "How much numbers do you want to use today?
1 = 2 numbers
2 = 3 numbers
3 = 4 numbers (doesnt work yet)"
3 = 4 numbers "
numbers = gets.chomp.to_i
if numbers == 1
puts "what operator are we using?(only plus works currently)"
puts "what operator are we using?(Only + works currently)"
operator = gets.chomp
if operator == "plus"
if operator == "+"
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
elsif numbers == 2
puts "What operator are we using?(Only plus works currently)"
puts "What operator are we using?(Only + works currently)"
operator = gets.chomp
if operator == "plus"
if operator == "+"
puts "Enter your numbers."
number_a2 = gets.chomp.to_i
number_b2 = gets.chomp.to_i
number_a = gets.chomp.to_i
number_b = gets.chomp.to_i
number_c = gets.chomp.to_i
final2 = number_a2 + number_b2 + number_c
puts "Final result: #{final2}"end
end
final = number_a + number_b + number_c
puts "Final result: #{final}"
end
elsif numbers == 3
puts "What operator are we using?(Only + works currently)"
operator = gets.chomp
if operator == "+"
puts "Enter your numbers."
number_a = gets.chomp.to_i
number_b = gets.chomp.to_i
number_c = gets.chomp.to_i
number_d = gets.chomp.to_i
final = number_a + number_b + number_c + number_d
puts "Final result: #{final}"end
end

0 comments on commit 3871cf6

Please sign in to comment.