Advertisement
kalin729

vapros

Jan 28th, 2017
241
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.89 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 bonus_points
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             var points = int.Parse(Console.ReadLine());
  14.             var bonus = 0.0;
  15.             if (points < 100 )
  16.             {
  17.                 bonus = 5;
  18.             }
  19.             else if (points>=100 && points <1000) {
  20.                 bonus = (points*0.2);
  21.             }
  22.             else if (points >= 1000)
  23.             {
  24.                 bonus = (points*0.1);
  25.             }
  26.             if (points % 2 == 0)
  27.             {
  28.                 bonus+=1;
  29.             }
  30.             else if (bonus % 10 == 5)
  31.             {
  32.                 bonus += 2;
  33.             }
  34.             Console.WriteLine(bonus);
  35.             Console.WriteLine(points + bonus);
  36.         }
  37.     }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement