belongs to collection: all conditional programs in c# language
Write C# Program to check number is positive, negative or zero.
I have used Visual Studio 2012 for debugging purpose. But you can use any version of visul studio as per your availability..
public class charpexercise
static void Main(string args)
Console.WriteLine("Enter any number: ");
num = Convert.ToInt32(Console.ReadLine());
if (num > 0)
Console.WriteLine("Enter number is positive ");
else if (num < 0)
Console.WriteLine("Enter number is nagative ");
Console.WriteLine("Enter number is zero ");
Enter any number:
Enter number is positive
total answers (1)
start bookmarking useful questions and collections and save it into your
own study-lists, login now to start creating your own collections.