Created
          November 6, 2013 04:48 
        
      - 
      
- 
        Save pepet96/7331071 to your computer and use it in GitHub Desktop. 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import java.util.Scanner; | |
| import java.io.*; | |
| class PosNeg { | |
| public static void main (String [] args) throws IOException { | |
| Scanner input = new Scanner(System.in); | |
| double number; | |
| System.out.println("This program will determine if the value entered is positive or negative. \nPlease enter a value for the program to read: "); | |
| number = input.nextDouble(); | |
| if (number > 0) | |
| System.out.println("The number is positive"); | |
| else if (number == 0 ) | |
| System.out.println("Why would you enter a value that is neither positive nor negative?"); | |
| else if (number < 0) | |
| System.out.println("The number is negative"); | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment