We will first enter one number
n (the number of integers that are about to be entered). We assign the current maximum
max an initial neutral value, for example -10000000000000 (or
int.MinValue). Using a
for loop that is iterated n-1 times, we read one integer
num on each iteration. If the read number
num is higher than the current maximum
max, we assign the value of the
num to the
max variable. Finally, in
max we must have stored the highest number. We print the number in the console.
Test your solution here: https://judge.softuni.bg/Contests/Practice/Index/510#4.