Advertisement
rivalcoba

the largest

Jun 6th, 2020
978
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.90 KB | None | 0 0
  1. using System;
  2.  
  3. class MainClass {
  4.   public static void Main (string[] args) {
  5.     Console.WriteLine("Ingrense el numero 1: ");
  6.     int num1 = ReadInt();
  7.     Console.WriteLine("Ingrense el numero 2: ");
  8.     int num2 = ReadInt();
  9.     Console.WriteLine("Ingrense el numero 3: ");
  10.     int num3 = ReadInt();
  11.     Console.WriteLine("Ingrense el numero 4: ");
  12.     int num4 = ReadInt();
  13.     Console.WriteLine("Ingrense el numero 5: ");
  14.     int num5 = ReadInt();
  15.  
  16.     Console.WriteLine($"El mayor es: {Largest(num1, num2,num3,num4,num5)}");
  17.   }
  18.  
  19.   // Metodo
  20.   public static int Largest(int n1, int n2, int n3, int n4, int n5){
  21.     // Creando la variable de respuesta
  22.     int theLargest = 0;
  23.     // # TU CODIGO RESPUESTA VA AQUI
  24.     //...
  25.     // # CODIGO TERMINA AQUI
  26.  
  27.     return theLargest;
  28.   }
  29.  
  30.   // Read int
  31.   public static int ReadInt()
  32.   {
  33.     return int.Parse(Console.ReadLine());
  34.   }
  35.  
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement