Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class ordercost
- {
- public static void main (String[] args)
- {
- System.out.println("number of dvds?");
- int dvd= IO.readInt();
- System.out.println("superfast delivery");
- boolean b= IO.readBoolean();
- double c=0;
- double x=0;
- if(b==true)
- {c=12.99;
- x= 4.99;}
- else
- {c=3.99;
- x=.99;}
- if(dvd>7)
- {c=0.0;
- x=0.0;}
- double d= dvd*14.99+x*dvd+c;
- System.out.println (d);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement