my simple command to check wh is the biggest number, is not working with 9 and 8 in visual studio with C#
using System.ComponentModel.Design;
class Program
{
static void Main()
{
int n1;
int n2;
int n3;
Console.WriteLine("Escreva o primeiro número: ");
n1 = int.Parse(Console.ReadLine());
Console.WriteLine("Escreva o segundo número: ");
n2 = int.Parse(Console.ReadLine());
Console.WriteLine("Escreva o terceiro número: ");
n3 = int.Parse(Console.ReadLine());
if (n1 > n2 & n1 > n3)
{
Console.WriteLine("O maior número entre os 3 é o PRIMEIRO");
}
else if (n2 > n1 & n2 > n3)
{
Console.WriteLine("O maior número entre os 3 é o SEGUNDO");
}
else if (n3 > n1 & n3 > n2)
{
Console.WriteLine("O maior número entre os 3 é o TERCEIRO");
}
else if (n1 == n2 & n2 == n3)
{
Console.WriteLine("Todos os 3 números são IGUAIS!");
}
Console.ReadLine();
}
}
Until then it worked perfectly, I just can't use these numbers repeatedly
CMD requests 3 numbers, if they are 9 or 8 the result simply does not appear
First number 99, second number 88 and third number 99:
But, does not return anything