Unsolved Java Programs:Write a program to input three numbers(positive or negative).if they are unequalthen display the greatest number otherwise,display they are equal.The program also displays whether the numbers entered by the user are 'All positive', 'All negative' or"Mixed numbers.Sample Input: 56, -15, 12Sample Output: The greatest number is 56Entered numbers are mixed numbers.
Answers
Answered by
0
Answer:
Logic to check positive, negative or zero
- Input a number from user in some variable say num .
- Check if(num < 0) , then number is negative.
- Check if(num > 0) , then number is positive.
- Check if(num == 0) , then number is zero.
Similar questions