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 ConsoleApplication56
- {
- class Program
- {
- static void Main(string[] args)
- {
- var num = int.Parse(Console.ReadLine());
- double BonusPoint=0;
- if (num > 1000)
- {
- BonusPoint = num * 0.10;
- }
- else if (num <= 100)
- {
- BonusPoint = 5;
- }
- else if (num > 100)
- {
- BonusPoint = num * 0.20;
- }
- if(num%10==5)
- {
- BonusPoint += 2;
- }
- else if (num%2==0)
- {
- BonusPoint += 1;
- }
- Console.WriteLine("Bonus score: {0}", BonusPoint);
- Console.WriteLine("Total score: {0}", num + BonusPoint);
- }
- }
- }
Add Comment
Please, Sign In to add comment