Input a number and find whether it is positive or negative.
1
Expert's answer
2011-06-15T11:15:43-0400
public class Program { & public static void main(String[] args) { & java.util.Scanner kb = new java.util.Scanner(System.in); & System.out.print("Please enter number: "); & double number = Double.parseDouble(kb.nextLine()); & if (number<0) System.out.println("Negative"); & else if (number>0) System.out.println("Positive"); & else System.out.println("Zero"); & } }
Finding a professional expert in "partial differential equations" in the advanced level is difficult.
You can find this expert in "Assignmentexpert.com" with confidence.
Exceptional experts! I appreciate your help. God bless you!
Comments