Advertisement
SSkrev

Bonus Score

Mar 19th, 2014
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.51 KB | None | 0 0
  1. using System;
  2.  
  3. class BonusScore
  4. {
  5.     static void Main()
  6.     {
  7.         int n = int.Parse(Console.ReadLine());
  8.         if (n < 1 || n > 9)
  9.         {
  10.             Console.WriteLine("Invalid score");
  11.         }
  12.         else if (n >= 1 && n <= 3 )
  13.         {
  14.             Console.WriteLine(n*10);
  15.         }
  16.         else if (n >= 3 && n <= 6)
  17.         {
  18.             Console.WriteLine(n*100);
  19.         }
  20.         else if (n >= 6 && n < 10)
  21.         {
  22.             Console.WriteLine(n*1000);
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement