Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int maxNum = int.MinValue;
- string input = Console.ReadLine();
- while (input != "Stop")
- {
- int num = int.Parse(input);
- if (num > maxNum)
- {
- maxNum = num;
- }
- input = Console.ReadLine();
- }
- Console.WriteLine(maxNum);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement