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 Padowan_Equipment
- {
- class Program
- {
- static void Main(string[] args)
- {
- double amountofmoney = double.Parse(Console.ReadLine());
- int countofstudents = int.Parse(Console.ReadLine());
- double priceoflightsabers = double.Parse(Console.ReadLine());
- double priceofrobes = double.Parse(Console.ReadLine());
- double priceofbeits = double.Parse(Console.ReadLine());
- double totalprice = 0;
- int countofbeits = countofstudents - countofstudents / 6;
- totalprice = priceoflightsabers * Math.Ceiling(countofstudents * 1.1) + priceofrobes * countofstudents + countofbeits * priceofbeits;
- double neededmoney = totalprice - amountofmoney;
- if (amountofmoney >= totalprice)
- {
- Console.WriteLine($"The money is enough - it would cost {totalprice:f2}lv.");
- }
- else
- {
- Console.WriteLine($"Ivan Cho will need {neededmoney:f2}lv more.");
- }
- }
- }
- }
Advertisement
Advertisement
Advertisement
RAW Paste Data
Copied
Advertisement