Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Find_Maximum_Value
- {
- class Program
- {
- static void Main(string[] args)
- {
- byte n = byte.Parse(Console.ReadLine());
- short maxValue = short.MinValue;
- for (int i = 1; i <= n; i++)
- {
- short currNum = short.Parse(Console.ReadLine());
- if (currNum >= maxValue)
- {
- maxValue = currNum;
- }
- }
- Console.WriteLine(maxValue);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement