Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.text.DecimalFormat;
- import java.util.Scanner;
- public class Main {
- public static void main(String[] args) {
- Scanner scanner = new Scanner(System.in);
- int score = scanner.nextInt();
- if( score >=1 && score <=9){
- if(score >=1 && score<=3 ){
- score *= 10;
- System.out.println(score);
- }else if(score >=4 && score <=6){
- score *= 100;
- System.out.println(score);
- }else{
- score *=1000;
- System.out.println(score);
- }
- }else{
- System.out.println("invalid score");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment