Advertisement
Guest User

Problem 2

a guest
Dec 13th, 2015
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.94 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace task_2
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             Console.WriteLine("Please write your score: ");
  14.             int score = int.Parse(Console.ReadLine());
  15.             if ((score <= 0) || (score >= 10))
  16.             {
  17.                 Console.WriteLine("Invalid Score!");
  18.             }
  19.             if ((score >= 1) && (score <= 3))
  20.             {
  21.                 score = score * 10;
  22.                 Console.WriteLine(score);
  23.             }
  24.             if ((score > 3) && (score <= 6))
  25.             {
  26.                 score = score * 100;
  27.                 Console.WriteLine(score);
  28.             }
  29.             if ((score > 6) && (score <= 9))
  30.             {
  31.                 score = score * 1000;
  32.                 Console.WriteLine(score);
  33.             }
  34.  
  35.         }
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement