GoConqr has a new look! Let us know what you think.

Module 4 of 9 · Text

Bucle For

Anthony Anthony

namespace Proyecto
{
    internal class Program
    {
        static void Main(string[] args)
        {

            Console.WriteLine("Cuantos clientes desea registrar");
            int cR = int.Parse(Console.ReadLine());

            for (int i = 1; i <= cR; i++)
            {
                Console.WriteLine($"Registro de la persona ${i}:");

                Console.WriteLine("Ingrese el Nombre");
                string nombre = Console.ReadLine();

                Console.WriteLine("Ingrese la edad");
                int edad = int.Parse(Console.ReadLine());

                Console.WriteLine("Los datos del cliente registrado son: ");
                Console.WriteLine($"Cliente {i}: {nombre}, y tiene {edad} años");
            }

           

 

 

 

/// EJERCICIO 2 

 string[] diasSemana = { "Lunes", "Martes", "Miercoles", "Jueves", "Viernes", "Sabado", "Domingo" };

 Console.WriteLine("Ingrese su día de descanso en número:");
 int dia = int.Parse(Console.ReadLine());

 if (dia >=1 && dia <=7)
 {
     Console.WriteLine($"Su día de descanso es: {diasSemana[dia - 1]}");
 }
 else
 {
     Console.WriteLine("Ingrese un número del 1 al 7");
 }

        }
    }
}

 

 

 

 

Instructions

You must submit an attempt for this quiz to progress. You can submit it after the last question.

Go to the chosen module

Feedback

What is it about?

What do you think of the new look?

How do you like it?