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