Advertisement
dragonbs

Max Number

Oct 23rd, 2022
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.59 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _06.MaxNumber
  4. {
  5.     internal class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             int maxNumberR = int.MinValue;
  10.  
  11.             string inputT = Console.ReadLine();
  12.  
  13.             while (inputT != "Stop")
  14.             {
  15.                 int currentNumber = int.Parse(inputT);
  16.                 if (currentNumber > maxNumberR)
  17.                 {
  18.                     maxNumberR = currentNumber;
  19.                 }
  20.                 inputT = Console.ReadLine();
  21.             }
  22.             Console.WriteLine(maxNumberR);
  23.         }
  24.     }
  25. }
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement