using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication
{
class Program
{
static void Main(string[] args)
{
//Accept the range of numbers typed in cmd prompt by taking
the min value in
//the range and max value in the range. Then analyze each
number
Console.WriteLine("Enter
the minimum number : ");
int minNum = Convert.ToInt32(Console.ReadLine());
Console.WriteLine("Enter
the maximum number : ");
int maxNum = Convert.ToInt32(Console.ReadLine());
for (int number =
minNum; number <= maxNum; number = number + 1)
{
if (number > 0)
{
Console.WriteLine("The number {0} is greater than Zero",
number);
}
else if
(number < 0)
{
Console.WriteLine("The number {0} is less than Zero",
number);
}
else
{
Console.WriteLine("This number is a Zero");
}
}
Console.ReadKey();
}
}
}
No comments:
Post a Comment