Write a C# program that requests a number (x) and answers if it is positive or negative.
public class PositiveAndNegative
public static void Main(string args)
int x = Convert.ToInt32(Console.ReadLine());
if (x > 0)
if (x < 0)
Practice C# anywhere with the free app for Android devices.
Learn C# at your own pace, the exercises are ordered by difficulty.
Own and third party cookies to improve our services. If you go on surfing, we will consider you accepting its use.