Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Oef3 {
- public static void main(String[] args) {
- // TODO Auto-generated method stub
- Scanner keyboard = new Scanner(System.in);
- System.out.println("amount?");
- int a = keyboard.nextInt();
- System.out.println("price?");
- int b = keyboard.nextInt();
- int c = a * b;
- System.out.println("totaal: " + c);
- if (c >= 1000) {
- int d = c - 22;
- System.out.println("-22β¬ korting");
- System.out.println("Nieuw totaal: " + d);
- } else {
- if (c >= 500) {
- int d = c - 10;
- System.out.println("-10β¬ korting");
- System.out.println("Nieuw totaal: " + d);
- }
- keyboard.close();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement