-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProgram.cs
More file actions
45 lines (40 loc) · 1.46 KB
/
Copy pathProgram.cs
File metadata and controls
45 lines (40 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
using System;
using System.Text;
using CapivaraGenerator.Capivara_;
namespace CapivaraGenerator
{
class Program
{
static void Main(string[] args)
{
Console.Title = "Capivara Generator 2000";
Console.OutputEncoding = Encoding.UTF8;
Capivara capivara = new Capivara();
int contador = 0;
int tamanho;
Console.WriteLine("Insira um valor");
int.TryParse(Console.ReadLine(),out tamanho);
tamanho = tamanho <= 0 ? 1 : tamanho;
while(contador < tamanho+5){
if(contador > 5 && contador < tamanho +4){
Console.WriteLine(capivara.linha[6]);
contador++;
}else if(contador == tamanho + 4){
Console.WriteLine(capivara.linha[7]);
contador++;
}else if(contador < 6){
switch(contador){
case 4 :
Console.WriteLine($"{capivara.linha[contador]}---> {capivara.gerarFala()}");
break;
default:
Console.WriteLine($"{capivara.linha[contador]}");
break;
}
contador ++;
}
}
Console.ReadKey();
}
}
}