Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Diagnostics.Eventing.Reader;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- class Program
- {
- static void Main(string[] args)
- {
- int numberOfFly = int.Parse(Console.ReadLine());
- int adultPas = int.Parse(Console.ReadLine());
- decimal adultTicketPrice = decimal.Parse(Console.ReadLine());
- int youngPas = int.Parse(Console.ReadLine());
- decimal youngTicketPrice = decimal.Parse(Console.ReadLine());
- decimal fuelPricePerHour = decimal.Parse(Console.ReadLine());
- double fuelLess = double.Parse(Console.ReadLine());
- double duration = double.Parse(Console.ReadLine());
- decimal myIncome = ((adultPas*adultTicketPrice) + (youngPas*youngTicketPrice));
- decimal expenses = (fuelPricePerHour*(decimal) (fuelLess*duration));
- decimal profit = (decimal) (myIncome - expenses);
- if (myIncome >= expenses)
- {
- Console.WriteLine($"You are ahead with {profit:f3}$.");
- }
- else
- {
- Console.WriteLine($"We've got to sell more tickets! We've lost {profit:f3}$.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement