Skip to content

Commit

Permalink
Ref #1 | Incluído Exec. 02, 03, 04
Browse files Browse the repository at this point in the history
  • Loading branch information
andrealonso committed Aug 21, 2019
1 parent c2c162b commit 0b1932b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Capitulo_4/2/Andre_Alonso.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
puts "Informe seu número favorito:"
num = gets.to_i

puts "Acho que o numero #{num.next} é melhor!"
4 changes: 4 additions & 0 deletions Capitulo_4/3/Andre_Alonso.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
puts "Informe um número:"
num = gets.to_i

puts "Antecessor é #{num.pred} e posterior é #{num.next}!"
4 changes: 4 additions & 0 deletions Capitulo_4/4/Andre_Alonso.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
puts "Informe valor investido:"
valor = gets.to_f

puts "Com reajuste de 1/100: R$ %.2f"% (valor*1.01)

0 comments on commit 0b1932b

Please sign in to comment.