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 bonus = Double.Parse(Console.ReadLine());
- var bonusScore = 0.0;
- if (bonus <= 100)
- {
- bonusScore = 5;
- }
- else if (bonus > 100 && bonus < 999)
- {
- bonusScore = (bonus * 20) / 100;
- }
- else if (bonus > 1000)
- {
- bonusScore = (bonus * 10) / 100;
- }
- if (bonus % 10 == 5)
- {
- bonusScore += 2;
- }
- else if (bonus % 2 == 0)
- {
- bonusScore += 1;
- }
- Console.WriteLine(bonusScore);
- Console.WriteLine(bonus + bonusScore);
- }
- }
- }
Add Comment
Please, Sign In to add comment