Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Exam
- {
- class Program
- {
- static void Main(string[] args)
- {
- double priceGoing = double.Parse(Console.ReadLine());
- double priceComming = double.Parse(Console.ReadLine());
- double priceGame = double.Parse(Console.ReadLine());
- int howManyGames = int.Parse(Console.ReadLine());
- double discount = int.Parse(Console.ReadLine());
- double all = 6 *(priceGoing + priceComming) * (1 - discount / 100 )+ howManyGames*priceGame*6;
- Console.WriteLine($"Total sum: {all:F2} lv.");
- Console.WriteLine($"Each friend has to pay {all/6:F2} lv.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment