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