Advertisement
Guest User

Untitled

a guest
Oct 13th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 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 ConsoleApp13
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. var a = int.Parse(Console.ReadLine());
  14. var bonusP = 0.0;
  15. if (a <= 99)
  16. bonusP = 5;
  17. { Console.Write("Bonus t: " + bonusP); }
  18. else if (a >= 100 && a <= 999)
  19. {Console.Write("Bonus t: " + bonusP);
  20. Console.WriteLine(bonusP =0.2 * a);}
  21. else if (a >= 1000)
  22. {Console.Write("Bonus t: "+bonusP);
  23. Console.WriteLine(bonusP = 0.1 * a);}
  24. Console.Write("Dopalnitelen bonus tochki: ");
  25. if (a % 2 == 0)
  26. bonusP = 1;
  27. { Console.WriteLine("Chetno- " + bonusP); }
  28. if (a % 10 == 5)
  29. bonusP = 2;
  30. {Console.WriteLine("Zavarshvashti na 5 "+ bonusP); }
  31. }
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement