0% found this document useful (0 votes)
21 views1 page

Escriba El Número

The document contains code that prompts the user to enter a number between 1-10. It then uses a switch statement to output the word equivalent in English for numbers 1-10. For any number greater than 10, it displays an error message.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views1 page

Escriba El Número

The document contains code that prompts the user to enter a number between 1-10. It then uses a switch statement to output the word equivalent in English for numbers 1-10. For any number greater than 10, it displays an error message.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

//ejercio 1

int numero;
Console.WriteLine("Escriba el número : ");
numero = int.Parse(Console.ReadLine());
switch (numero)
{
case (1):
Console.WriteLine("one");
break;
case (2):
Console.WriteLine("two");
break;
case (3):
Console.WriteLine("three");
break;
case (4):
Console.WriteLine("four");
break;
case (5):
Console.WriteLine("five");
break;
case (6):
Console.WriteLine("six");
break;
case (7):
Console.WriteLine("seven");
break;
case (8):
Console.WriteLine("Eight");
break;
case (9):
Console.WriteLine("nine");
break;
case (10):
Console.WriteLine("ten");
break;

default:
Console.WriteLine("erorrrr......Escriba un numero menor a 10 por
favor ");
break;
}
Console.WriteLine("fin del Programa");
Console.ReadKey();

You might also like