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 ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- int number = int.Parse(Console.ReadLine());
- double bonusPounts = 0;
- if (number <= 100)
- {
- // 5 bonux tochki
- bonusPounts = 5;
- }
- else if (number > 1000)
- {
- //10 % bonux tochki
- double percent = 10.0 / 100;
- bonusPounts = percent * number;
- }
- else if (number > 100)
- {
- // 20 % bonux tochki
- double percent = 20.0 / 100;
- bonusPounts = percent * number;
- }
- if (number % 2 ==0)
- {
- bonusPounts = bonusPounts + 1;
- }
- else if (number % 10 == 5)
- {
- bonusPounts = bonusPounts + 2;
- }
- Console.WriteLine(bonusPounts);
- Console.WriteLine(bonusPounts + number);
- }
- }
- }
Add Comment
Please, Sign In to add comment