Advertisement
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 ConsoleApplication14
- {
- class Program
- {
- static void Main()
- {
- int number = int.Parse(Console.ReadLine());
- double bonus = 0.0;
- if (number <= 100)
- {
- bonus = 5;
- }
- else if (number > 100 && number <= 1000)
- {
- bonus = (number / 5.0);
- }
- else if (number > 1000)
- {
- bonus = (number / 10.0);
- }
- if (number % 2 == 0)
- {
- bonus += 1;
- }
- else if (number % 10 == 5)
- {
- bonus += 2;
- }
- double totalscore = number + bonus;
- Console.WriteLine(bonus);
- Console.WriteLine(totalscore);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement