Advertisement
Guest User

Untitled

a guest
Jan 24th, 2020
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. using System;
  2.  
  3. public class Program
  4. {
  5. public static void Main()
  6. {
  7. int numCount = int.Parse(Console.ReadLine());
  8. int i= 0;
  9. int max = int.MinValue;
  10.  
  11. while(i < numCount)
  12. {
  13. int input = int.Parse(Console.ReadLine());
  14. if(input > max)
  15. {
  16. max=input;
  17. }
  18. i++;
  19. }
  20. Console.WriteLine(max);
  21.  
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement