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