//To check if the input integer is a positive or negative nuber.
Answers
Answered by
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
Accountancy,
2 months ago
Geography,
2 months ago
Social Sciences,
2 months ago
English,
5 months ago
Environmental Sciences,
5 months ago
English,
10 months ago
Science,
10 months ago