ramsess90

Untitled

Jan 29th, 2017
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.91 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Bonus_Score
  4. {
  5.     class Program
  6.     {
  7.         static void Main ( string[] args )
  8.         {
  9.             int Chislo = int.Parse(Console.ReadLine());
  10.             decimal Bonus_tochki = 0;
  11.             if (Chislo <= 100)
  12.             {
  13.                 Bonus_tochki = 5;
  14.             }
  15.             else if (Chislo > 100 && Chislo < 1000)
  16.             {
  17.                 Bonus_tochki = Chislo * (decimal)0.20;
  18.             }
  19.             else if (Chislo > 1000)
  20.             {
  21.                 Bonus_tochki = Chislo * 10 / 100;
  22.             }
  23.             if (Chislo % 2 == 0)
  24.             {
  25.                 Bonus_tochki++;
  26.             }
  27.             else if (Chislo % 10 == 5)
  28.             {
  29.                 Bonus_tochki += 2;
  30.             }
  31.             Console.WriteLine($"Bonus score: {Bonus_tochki}");
  32.             Console.WriteLine($"Total score: {Chislo + Bonus_tochki}");
  33.         }
  34.     }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment