0% found this document useful (0 votes)
9 views3 pages

New Document

The document contains code for 3 programs that take user input and output corresponding days of the week, months, or words starting with a given letter. The first program maps numbers 1-7 to days of the week. The second program maps numbers 1-12 to months. The third program maps letters a, e, i, o, u to example words starting with that letter.

Uploaded by

isaelcapellan0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views3 pages

New Document

The document contains code for 3 programs that take user input and output corresponding days of the week, months, or words starting with a given letter. The first program maps numbers 1-7 to days of the week. The second program maps numbers 1-12 to months. The third program maps letters a, e, i, o, u to example words starting with that letter.

Uploaded by

isaelcapellan0
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

LogaritmoDiasDeLaSemana

using System;

class Program1
{
public static void Main()
{
Console.WriteLine("Write number:");
int number = Convert.ToInt32(Console.ReadLine());

if(number == 2)
{

Console.WriteLine("LUNES");

}
else if(number == 3)
{
Console.WriteLine("MARTES");
}

else if(number == 4)
{
Console.WriteLine("MIERCOLES");
}
else if(number == 5)
{
Console.WriteLine("JUEVES");
}
else if(number == 6)
{
Console.WriteLine("VIERNES");
}
else if(number == 7)
{
Console.WriteLine("SABADO");
}
else if(number == 1)
{
Console.WriteLine("DOMINGO");
}
else
{
Console.WriteLine("Este dia de la semana no existe");

}
}
Programa Meses del year
using System;

class Program1
{ Type your text
public static void Main()
{
int number;
Console.WriteLine("Please Write one number to define the months: ");
number = Convert.ToInt32(Console.ReadLine());

switch (number)
{
case 1:
Console.WriteLine("ENERO");
break;
case 2:
Console.WriteLine("FEBRERO");
break;
case 3:
Console.WriteLine("MARZO");
break;
case 4:
Console.WriteLine("ABRIL");
break;
case 5:
Console.WriteLine("MAYO");
break;
case 6:
Console.WriteLine("JUNIO");
break;
case 7:
Console.WriteLine("JULIO");
break;
case 8:
Console.WriteLine("AGOSTO");
break;
case 9:
Console.WriteLine("SEPTIEMBRE");
break;
case 10:
Console.WriteLine("OCTUBRE");
break;
case 11:
Console.WriteLine("NOVIEMBRE");
break;
case 12:
Console.WriteLine("DICIEMBRE");
break;
default:
Console.WriteLine("El numero no es valido para los meses del year");
break;

Console.WriteLine();

}
}
Programa Vocales children

using System;

public class HelloWorld


{
public static void Main(string[] args)
{
char letra;
Console.WriteLine("write one letter: ");
Console.WriteLine("a");
Console.WriteLine("e");
Console.WriteLine("i");
Console.WriteLine("o");
Console.WriteLine("u");
letra = Convert.ToChar(Console.ReadLine());
if (letra == 'a')
{

Console.WriteLine("Apple");
Console.WriteLine("Athletic");
}
else if (letra == 'A')
{

Console.WriteLine("Apple");
Console.WriteLine("Athletic");
}
else if (letra == 'e')
{

Console.WriteLine("Edify");
Console.WriteLine("Email");
}
else if (letra == 'E')
{

Console.WriteLine("Edify");
Console.WriteLine("Email");
}
else if (letra == 'i')
{

Console.WriteLine("Ingeiero");
Console.WriteLine("Informatica");
}
else if (letra == 'I')
{

Console.WriteLine("Ingeiero");
Console.WriteLine("Informatica");
}
else if (letra == 'o')
{

Console.WriteLine("Operacion");
Console.WriteLine("Obrero");
}
else if (letra == 'O')
{

Console.WriteLine("Operacion");
Console.WriteLine("Obrero");
}
else if (letra == 'u')
{

Console.WriteLine("uncle");
Console.WriteLine("underdog");
}
else if (letra == 'U')
{

Console.WriteLine("uncle");
Console.WriteLine("underdog");
}
else
{
Console.WriteLine("The letter, it is not avialable");
}

You might also like