Advertisement
DeeAG

BonusScore

Oct 14th, 2020
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.83 KB | None | 0 0
  1. namespace BonusScore
  2. {
  3. using System;
  4.     class StartUp
  5.     {
  6.         static void Main(string[] args)
  7.         {
  8.             int number = int.Parse(Console.ReadLine());
  9.             double bonusPoints = 0.0;
  10.             if (number <= 100)
  11.             {
  12.                 bonusPoints = 5;
  13.             }
  14.             else if (number > 1000)
  15.             {
  16.                 bonusPoints = number * 0.1;
  17.             }
  18.             else
  19.             {
  20.                 bonusPoints = number * 0.2;
  21.             }
  22.             if (number % 2 == 0)
  23.             {
  24.                 bonusPoints = bonusPoints + 1;
  25.             }
  26.             else if (number % 10 == 5)
  27.             {
  28.                 bonusPoints += 2;
  29.             }
  30.             Console.WriteLine(bonusPoints);
  31.             Console.WriteLine(number + bonusPoints);
  32.         }
  33.     }
  34. }
  35.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement