Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package javaapplication42;
- import java.util.*;
- public class JavaApplication42 {
- public static void main(String[] args) {
- Scanner sc = new Scanner(System.in);
- while (sc.hasNext()){
- int n =sc.nextInt();
- int x=0;
- if(n>=40){
- x=100;
- }else if(n>20 ){
- x=80 + (n-20);
- }else if(n>10){
- x = 60 + 2*(n-10);
- }else{
- x = n *6;
- }
- System.out.println(x);
- }//while input end
- }
- }
Add Comment
Please, Sign In to add comment