Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Numerics;
- using System.Text.RegularExpressions;
- public class LettersSymbolsNumbers
- {
- static void Main()
- {
- double budget = double.Parse(Console.ReadLine());
- string input = Console.ReadLine();
- double broiHoraGrupa = double.Parse(Console.ReadLine());
- double VIPResult = 499.99;
- double normalResult = 249.99;
- double test = 0;
- if (broiHoraGrupa >= 1 && broiHoraGrupa <= 4)
- {
- test = budget * 25 / 100;
- budget -= test;
- }
- else if (broiHoraGrupa >= 5 && broiHoraGrupa <= 9)
- {
- test = budget * 40 / 100;
- budget -= test;
- }
- else if (broiHoraGrupa >= 10 && broiHoraGrupa <= 24)
- {
- test = budget * 50 / 100;
- budget -= test;
- }
- else if (broiHoraGrupa >= 25 && broiHoraGrupa <= 49)
- {
- test = budget * 60 / 100;
- budget -= test;
- }
- else if (broiHoraGrupa >= 50)
- {
- test = budget * 75 / 100;
- budget -= test;
- }
- if (input == "VIP")
- {
- VIPResult *= broiHoraGrupa;
- if (VIPResult < test)
- {
- Console.WriteLine("Yes! You have {0:F2} leva left.", test - normalResult);
- }
- else
- {
- Console.WriteLine("Not enough money! You need {0:F2} leva.",VIPResult - test);
- }
- }
- else if (input == "Normal")
- {
- normalResult *= broiHoraGrupa;
- if (normalResult < test)
- {
- Console.WriteLine("Yes! You have {0:F2} leva left.", test - normalResult);
- }
- else
- {
- Console.WriteLine("Not enough money! You need {0:F2} leva.", normalResult - test);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement