Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var N = double.Parse(Console.ReadLine());
- var Z = int.Parse(Console.ReadLine());
- var F = double.Parse(Console.ReadLine());
- var P = double.Parse(Console.ReadLine());
- var coming_kids = Math.Ceiling(Z*0.85);
- var money_kids = Math.Floor(coming_kids*0.8);
- var money_from_kids = money_kids * F;
- var money_collected = money_from_kids + N;
- var cost = (coming_kids*4.5) + (P*0.05);
- var final_money = money_collected - cost;
- var scooter_money = final_money - P;
- if (final_money > P)
- {
- Console.WriteLine("Asparuh will be driving a fast 49cc Scooter soon.");
- Console.WriteLine(String.Format("Money left: {0:0.00} BGN", scooter_money));
- }
- else {
- Console.WriteLine(String.Format("If only asparuh had {0:0.00} BGN more...", Math.Abs(scooter_money)));
- Console.WriteLine("Guess he will be walking for now.");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement