Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class BonusScore {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int A = Integer.parseInt(scanner.nextLine());
- double B = 0 ;
- if(A<=100){
- B= 5;
- }else if (A<=1000){
- B= A * 0.2;
- }else {
- B= A*0.1;
- }
- if (A % 2 == 0){
- B=B+1;
- }else if (A % 10 == 5){
- B=B+2;
- }
- System.out.println(B);
- System.out.println(A+B);
- }
- }
Add Comment
Please, Sign In to add comment