Created
          November 6, 2013 05:03 
        
      - 
      
- 
        Save pepet96/7331181 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 Shirts { | |
| public static void main (String [] args) throws IOException { | |
| Scanner input = new Scanner(System.in); | |
| double shirts,total; | |
| System.out.println("This program will calculate the total price for your order. \nPlease enter the number of shirts you want to buy: "); | |
| shirts = input.nextDouble(); | |
| if (shirts > 3) { | |
| total = shirts*10; | |
| System.out.println("The price of your order is: $" + total); | |
| } | |
| else if (shirts >= 0){ | |
| total = shirts*12; | |
| System.out.println("The price of your order is: $" + total); | |
| } | |
| else if (shirts < 0){ | |
| System.out.println("The value you entered is not possible!"); | |
| } | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment