Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Exam_1
- {
- class Program
- {
- static void Main(string[] args)
- {
- string name = Console.ReadLine();
- int countElders =int.Parse(Console.ReadLine());
- int countChild =int.Parse(Console.ReadLine());
- int priceperOneElders = int.Parse(Console.ReadLine());
- int tax = int.Parse(Console.ReadLine());
- double priceChildTickets = priceperOneElders * 0.30;
- int priceElders = priceperOneElders + tax;
- double priceChild = priceChildTickets + tax;
- double allPrice = (countChild * priceChild) + (countElders * priceElders);
- double money = allPrice * 0.20;
- Console.WriteLine($"The profit of your agency from {name} tickets is { money:f2} lv. ");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment