I am trying that when i input 10 random numbers on console then message will be display these numbers are less than 10
e..g if i input these random numbers 10,9,12,45,120,2,3,1,9,14
then message display 9,2,3,1,9 are less than 10
What I have tried:
public void p1()
{
try
{
Console.WriteLine("Enter numbers");
int num = Convert.ToInt32(Console.ReadLine());
if (num < 10)
{
Console.WriteLine("less num", num);
Console.ReadLine();
}
else
{
Console.WriteLine("Not less than num", num);
Console.ReadLine();
}
}
catch (Exception ex)
{
throw new Exception();
}
}
but this work like that when i enter only 1 e.g. if i enter 9 number then message display less number and when i enter 12 then message display Not less than num where as i want i input 10 numbers and from that program identifies which numbers are less than 10 how i do that CHECK THIS GIF
