Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace AgencyProfit
- {
- class Program
- {
- static void Main(string[] args)
- {
- string agency = Console.ReadLine();
- int ticket = int.Parse(Console.ReadLine());
- int kidTicket = int.Parse(Console.ReadLine());
- double ticketPrice = double.Parse(Console.ReadLine());
- double service = double.Parse(Console.ReadLine());
- double totalAdult = (ticketPrice + service) * ticket;
- double totalKid = (0.3 * ticketPrice + service) * kidTicket;
- double total = (totalAdult + totalKid) / 5;
- Console.WriteLine($"The profit of your agency from {agency} tickets is {total:f2} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement