Program to display a number if user enters negative number.If user enters positive number, that number cannot be displayed code example
Example: #pass positive or negative c
using System;
class MainClass {
public static void Main (string[] args) {
int x = int.Parse(Console.ReadLine());
if(x > 0)
{
Console.WriteLine ("positive");
}
if(x < 0)
{
Console.WriteLine ("negative");
}
if(x == 0)
{
Console.WriteLine ("zero");
}
}
}