Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace FinalExam
- {
- class Program
- {
- static void Main()
- {
- int restTime = int.Parse(Console.ReadLine());
- double priceSinglePacket = double.Parse(Console.ReadLine());
- double adnventurePrice = double.Parse(Console.ReadLine());
- double coffeePrice = double.Parse(Console.ReadLine());
- double spentMoney = 0;
- spentMoney += coffeePrice + 3 * priceSinglePacket + 2 * adnventurePrice;
- int leftTime = restTime - (5 + 3 * 2 + 2 * 2);
- Console.WriteLine($"{spentMoney:F2}");
- Console.WriteLine(leftTime);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement