Answers for "positive numbers c"

C#
1

#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");
    }

  }
}
Posted by: Guest on September-23-2020

Code answers related to "positive numbers c"

C# Answers by Framework

Browse Popular Code Answers by Language