10. Write a program to input a number and test whether it is a positive number or negative number or
zero
In java
Answers
Answered by
2
Answer:
this post, we will write two java programs, first java programs checks whether the specified number is positive or negative. The second program takes the input number (entered by user) and checks whether it is positive or negative and displays the result.
→ If a number is greater than zero then it is a positive number
→ If a number is less than zero then it is a negative number
→ If a number is equal to zero then it is neither negative nor positive.
Lets write this logic in a Java Program.
Similar questions