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