Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class MainClass {
- public static void Main (string[] args) {
- Console.WriteLine("Ingrense el numero 1: ");
- int num1 = ReadInt();
- Console.WriteLine("Ingrense el numero 2: ");
- int num2 = ReadInt();
- Console.WriteLine("Ingrense el numero 3: ");
- int num3 = ReadInt();
- Console.WriteLine("Ingrense el numero 4: ");
- int num4 = ReadInt();
- Console.WriteLine("Ingrense el numero 5: ");
- int num5 = ReadInt();
- Console.WriteLine($"El mayor es: {Largest(num1, num2,num3,num4,num5)}");
- }
- // Metodo
- public static int Largest(int n1, int n2, int n3, int n4, int n5){
- // Creando la variable de respuesta
- int theLargest = 0;
- // # TU CODIGO RESPUESTA VA AQUI
- //...
- // # CODIGO TERMINA AQUI
- return theLargest;
- }
- // Read int
- public static int ReadInt()
- {
- return int.Parse(Console.ReadLine());
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement