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 ConsoleApp13
- {
- class Program
- {
- static void Main(string[] args)
- {
- var a = int.Parse(Console.ReadLine());
- var bonusP = 0.0;
- if (a <= 99)
- bonusP = 5;
- { Console.Write("Bonus t: " + bonusP); }
- else if (a >= 100 && a <= 999)
- {Console.Write("Bonus t: " + bonusP);
- Console.WriteLine(bonusP =0.2 * a);}
- else if (a >= 1000)
- {Console.Write("Bonus t: "+bonusP);
- Console.WriteLine(bonusP = 0.1 * a);}
- Console.Write("Dopalnitelen bonus tochki: ");
- if (a % 2 == 0)
- bonusP = 1;
- { Console.WriteLine("Chetno- " + bonusP); }
- if (a % 10 == 5)
- bonusP = 2;
- {Console.WriteLine("Zavarshvashti na 5 "+ bonusP); }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement