Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- class Program
- {
- static void Main()
- {
- int n = int.Parse(Console.ReadLine());
- double bonusPoints = 0.0;
- double totalPoints = 0.0;
- if (n <= 100)
- {
- bonusPoints = 5;
- }
- else if (n > 100 && n <= 1000)
- {
- bonusPoints = n * 20 / 100;
- }
- else if (n > 1000)
- {
- bonusPoints = n * 10 / 100;
- }
- if (n % 2 == 0)
- {
- bonusPoints += 1;
- }
- else if (n % 10 == 5)
- {
- bonusPoints += 2;
- }
- totalPoints = n + bonusPoints;
- Console.WriteLine(bonusPoints);
- Console.WriteLine(totalPoints);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement