Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Text.RegularExpressions;
- namespace Regex_test
- {
- class Program
- {
- static void Main(string[] args)
- {
- double money = double.Parse(Console.ReadLine());
- int Students = int.Parse(Console.ReadLine());
- double prizeSabers = double.Parse(Console.ReadLine());
- double freeSaber = Math.Ceiling(Students * 1.1);
- //while (copyStudents % 6 == 0 && copyStudents > 0)
- //{
- // copyStudents -= 6;
- // Count++;
- //}
- int Count = (int)(Students/6);
- double prizeOfRobes = double.Parse(Console.ReadLine());
- double prizeOfBelts = double.Parse(Console.ReadLine());
- double cost = (Students - Count) * prizeOfBelts + Students * prizeOfRobes + (freeSaber * prizeSabers);
- //if (money - cost > 0)
- if (money - cost >= 0)
- {
- Console.WriteLine($"The money is enough - it would cost {cost:F2}lv.");
- }
- else
- {
- Console.WriteLine($"Ivan Cho will need {(cost - money):F2}lv more.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement