1
resposta

[Sugestão] minha sugestao

int resultado = 1;
        int fatorial =6;


        for (int i =1;i <=fatorial;i++)
        {
            resultado = resultado * i;
        }
        Console.WriteLine(resultado);

Garanta sua matrícula hoje e ganhe + 2 meses grátis

Continue sua jornada tech com ainda mais tempo para aprender e evoluir

Quero aproveitar agora
1 resposta

using static System.Console; //Essa diretiva torna opcional escrever Console

Write("Informe o número: ");

var numero = Convert.ToInt32(ReadLine());

for (int i = 1; i < 11; i++)

{

WriteLine($"O fatorial de {numero} X {i} = {numero * i}");

}

ReadKey();