Anzzhhela98

fwe

Jul 19th, 2020
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.83 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Exam_1
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             string name = Console.ReadLine();
  10.             int countElders =int.Parse(Console.ReadLine());
  11.            int countChild =int.Parse(Console.ReadLine());
  12.            int priceperOneElders = int.Parse(Console.ReadLine());
  13.            int tax = int.Parse(Console.ReadLine());
  14.  
  15.            double priceChildTickets = priceperOneElders * 0.30;
  16.             int priceElders = priceperOneElders + tax;
  17.           double   priceChild = priceChildTickets + tax;
  18.  
  19.             double allPrice = (countChild * priceChild) + (countElders * priceElders);
  20.             double money = allPrice * 0.20;
  21.  
  22.             Console.WriteLine($"The profit of your agency from {name} tickets is { money:f2} lv. ");
  23.  
  24.  
  25.  
  26.  
  27.         }
  28.     }
  29. }
Advertisement
Add Comment
Please, Sign In to add comment