Advertisement
StoyanKyrie11

Untitled

Jun 30th, 2018
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.63 KB | None | 0 0
  1. package FirstTelerikPractice;
  2.  
  3. import java.util.Scanner;
  4.  
  5. public class BonusScore {
  6.     public static void main(String[] args) {
  7.         Scanner scanner = new Scanner(System.in);
  8.  
  9.         int score = Integer.parseInt(scanner.nextLine());
  10.  
  11.         if (score >= 1 && score <= 3) {
  12.             System.out.println(score * 10);
  13.         } else if (score >= 4 && score <= 6) {
  14.             System.out.println(score * 100);
  15.         } else if (score >= 7 && score <= 9) {
  16.             System.out.println(score * 1000);
  17.         } else if (score < 0 || score > 9) {
  18.             System.out.println("Invalid score");
  19.         }
  20.     }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement