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 TrainingLab
- {
- class TrainingLab
- {
- static void Main(string[] args)
- {
- var budget = double.Parse(Console.ReadLine());
- var statists = int.Parse(Console.ReadLine());
- var costums = double.Parse(Console.ReadLine());
- var decor = budget * 0.10;
- double sumcost = 0.0;
- if (statists <= 150)
- {
- sumcost = statists * costums;
- }
- else
- {
- sumcost = statists * costums - ((statists * costums) * 0.10);
- }
- var movie = decor + sumcost;
- var rest = budget - movie;
- var need = budget - movie;
- if (movie <= budget)
- {
- Console.WriteLine("Action!");
- Console.WriteLine("Wingard starts filming with {0:f2} leva left", rest);
- }
- else
- {
- Console.WriteLine("Not enough money!");
- Console.WriteLine("Wingard needs {0:f2} leva more.", Math.Abs(need));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement