Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace Bonus_Score
- {
- class Program
- {
- static void Main(string[] args)
- {
- var num = int.Parse(Console.ReadLine());
- double bonus = 0.00;
- if (num <= 100)
- {
- bonus = 5;
- }
- else if (num > 1000)
- {
- bonus = num * 0.1;
- }
- else if (num >100)
- {
- bonus = num * 0.2;
- }
- if (num % 2 == 0)
- {
- bonus = bonus + 1;
- }
- else if (num % 10 == 5)
- {
- bonus = bonus + 2;
- }
- Console.WriteLine(bonus);
- Console.WriteLine(num+bonus);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment