Advertisement
Stan0033

Untitled

Mar 21st, 2021
143
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 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.  
  14. int number = Convert.ToInt32(Console.ReadLine());
  15. double Bonus_to_number = 0;
  16.  
  17. //-------------------------------------------------------
  18. /*1*/if (number < 101) { Bonus_to_number += 5; }
  19. /*2*/ if (number > 100) { Bonus_to_number += (number * 0.20); }
  20. /*3*/ if (number > 1000) { Bonus_to_number += (number * 0.10); }
  21. /*4*/ if (number % 2 == 0) { Bonus_to_number++; }
  22. /*5*/ if (Math.Abs(number % 10) == 5) { Bonus_to_number += 2; }
  23. //-------------------------------------------------------
  24. Console.WriteLine(Bonus_to_number);
  25. Console.WriteLine(number + Bonus_to_number);
  26.  
  27. }
  28. }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement