Advertisement
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 foodMoney = double.Parse(Console.ReadLine());
- double souvenirMoney = double.Parse(Console.ReadLine());
- double hotelMoney = double.Parse(Console.ReadLine());
- double sumForTransport = (420.0 / 100.0) * 7 * 1.85;
- double foodAndSouvenir = 3 * foodMoney + 3 * souvenirMoney;
- double sumForStay = hotelMoney * 0.9 + hotelMoney * 0.85 + hotelMoney * 0.8;
- double totalSum = sumForTransport + foodAndSouvenir + sumForStay;
- Console.WriteLine($"Money needed: {totalSum:f2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement