Mishakis

BonusScore

Oct 1st, 2018
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.68 KB | None | 0 0
  1. import java.text.DecimalFormat;
  2. import java.util.Scanner;
  3.  
  4. public class Main {
  5.  
  6.     public static void main(String[] args) {
  7.         Scanner scanner = new Scanner(System.in);
  8.  
  9.         int score = scanner.nextInt();
  10.  
  11.         if( score >=1 && score <=9){
  12.             if(score >=1 && score<=3 ){
  13.                 score *= 10;
  14.                 System.out.println(score);
  15.             }else if(score >=4 && score <=6){
  16.                 score *= 100;
  17.                 System.out.println(score);
  18.             }else{
  19.                 score *=1000;
  20.                 System.out.println(score);
  21.             }
  22.         }else{
  23.             System.out.println("invalid score");
  24.         }
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment