Anzzhhela98

tomm

Jun 16th, 2020
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.02 KB | None | 0 0
  1. using System;
  2.  
  3. namespace ConsoleApp2
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.  
  10.             double startPoints = double.Parse(Console.ReadLine());
  11.             double givePoints = 0;
  12.             if (startPoints<=100)
  13.             {
  14.                 givePoints = 5;
  15.             }
  16.            
  17.             else if (startPoints>1000)
  18.             {
  19.                 givePoints = startPoints * 0.1 ;
  20.             }
  21.             //по условие е зададена като втора  проверка, тази която ни е else ???
  22.             else
  23.             {
  24.                 givePoints = (startPoints * 0.20);
  25.             }
  26.             if (startPoints%2==0)
  27.             {
  28.                 givePoints = givePoints + 1;
  29.             }
  30.             else if (startPoints%10==5)
  31.             {
  32.                 givePoints += 2;
  33.             }
  34.             Console.WriteLine(givePoints);
  35.             Console.WriteLine(givePoints + startPoints);
  36.            
  37.         }
  38.  
  39.     }
  40. }
Add Comment
Please, Sign In to add comment