Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Janka
- {
- class MainClass
- {
- public static void Main(string[] args)
- {
- double onwayTicket = double.Parse(Console.ReadLine());
- double backwayTicket = double.Parse(Console.ReadLine());
- double gameTicket = double.Parse(Console.ReadLine());
- double numberGames = double.Parse(Console.ReadLine());
- double discount = double.Parse(Console.ReadLine());
- double ticketsForAll = 6 * (onwayTicket + backwayTicket);
- double discount1 = (ticketsForAll * 15) / 100;
- double afterdiscount = ticketsForAll - discount1;
- double totalSumforbilets = 6 * numberGames * gameTicket;
- double totalSUM = afterdiscount + totalSumforbilets;
- double singlePay = totalSUM / 6;
- Console.WriteLine($"Total sum: {totalSUM:f2} lv.");
- Console.WriteLine($"Each friends has to pay {singlePay:f2} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment