Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class Bunuses_Points {
- public static void main(String[] args) {
- Scanner keyboard = new Scanner(System.in);
- System.out.print("Enter points: ");
- int points = keyboard.nextInt();
- double bonus = 0;
- if (points <= 100) {
- bonus = 5;
- } else if (points > 1000) {
- bonus = points * 0.1;
- } else if (points > 100) {
- bonus = points * 0.2;
- }
- if (points % 2 == 0) {
- bonus += 1;//bonus = bonus + 1;
- } else if (points % 10 == 5) {
- bonus += 2;//bonus = bonus + 2;
- }
- System.out.println(bonus);
- System.out.println(points + bonus);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement