Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.39 KB | None | 0 0
  1. public class ordercost
  2. {
  3. public static void main (String[] args)
  4.     {
  5. System.out.println("number of dvds?");
  6. int dvd= IO.readInt();
  7.  
  8. System.out.println("superfast delivery");
  9. boolean b= IO.readBoolean();
  10.  
  11. double c=0;
  12. double x=0;
  13.  
  14. if(b==true)
  15. {c=12.99;
  16. x= 4.99;}
  17.  
  18. else
  19. {c=3.99;
  20. x=.99;}
  21.  
  22. if(dvd>7)
  23. {c=0.0;
  24. x=0.0;}
  25.  
  26. double d= dvd*14.99+x*dvd+c;
  27. System.out.println (d);
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement