08. Number sequence
Nqkoi moje li da mi kaje kude mi e greshkata,che neshto ne q vijdm, no judge ne e suglasen s reshenieto mi ?!
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _08.Number_sequence
{
class Program
{
static void Main(string[] args)
{
int maxNum = int.MaxValue;
int minNum = int.MinValue;
int current;
int nubers = int.Parse(Console.ReadLine());
for (int i = 0; i < nubers; i++)
{
current = int.Parse(Console.ReadLine());
if (current > maxNum)
{
maxNum = current;
}
if (current < minNum)
{
minNum = current;
}
// Max number: 305
// Min number: 0
Console.WriteLine("Max number:" +maxNum);
Console.WriteLine("Min number:" +minNum);
}
}
}
}