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 BonusScore
- {
- class BonusScore
- {
- static void Main(string[] args)
- {
- var number = int.Parse(Console.ReadLine());
- var bonusscore = 0.0;
- if (number <= 100)
- {
- bonusscore += 5;
- }
- else if (number <= 1000)
- {
- bonusscore = bonusscore + (number * 0.2 );
- }
- else if (number > 1000)
- {
- bonusscore = bonusscore + (number * 0.1);
- }
- if (number % 2 == 0)
- {
- bonusscore += 1;
- }
- else if (number % 10 == 5)
- {
- bonusscore += 2;
- }
- Console.WriteLine(bonusscore);
- Console.WriteLine(number + bonusscore);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment