Computer Science, asked by captaditya19122006, 5 months ago

//To check if the input integer is a positive or negative nuber.

Answers

Answered by jainsuparshav
1

Answer:

Java Program to Check if a Given Integer is Positive or Negative

public class Postive_Negative.

int n;

Scanner s = new Scanner(System.

System. out. print("Enter the number you want to check:");

n = s. nextInt();

if(n > 0)

System. out. println("The given number "+n+" is Positive");

else if(n < 0)

Similar questions