From ea3f2535dc082bb87247047a9e1288aff33be64f Mon Sep 17 00:00:00 2001 From: HenriqueMariano25 Date: Tue, 27 Aug 2019 22:01:15 -0300 Subject: [PATCH] =?UTF-8?q?=20Ref=20#8=20|=20Adiciona=20Resolu=C3=A7=C3=A3?= =?UTF-8?q?o=20de=20Henrique?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Capitulo_8/1/henrique_mariano.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Capitulo_8/1/henrique_mariano.rb diff --git a/Capitulo_8/1/henrique_mariano.rb b/Capitulo_8/1/henrique_mariano.rb new file mode 100644 index 0000000..7845d63 --- /dev/null +++ b/Capitulo_8/1/henrique_mariano.rb @@ -0,0 +1,11 @@ +puts "Quantas vezes vai repetir os elefantes" +repeticao = gets.to_i +for x in 1..repeticao + if x % 2 == 0 + puts "#{x} elefantes #{"incomodam "*x}muito mais" + elsif x == 1 + puts "1 elefante incomodam muita gente" + else + puts "#{x} incomodam muita gente" + end +end \ No newline at end of file