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 moneyPocket = double.Parse(Console.ReadLine());
- double moneyWin = double.Parse(Console.ReadLine());
- double moneyExpense = double.Parse(Console.ReadLine());
- double pricePresent = double.Parse(Console.ReadLine());
- double all = (moneyPocket + moneyWin) * 5 - moneyExpense;
- if (pricePresent > all)
- {
- Console.WriteLine($"Insufficient money: {pricePresent-all:F2} BGN.");
- }
- else
- {
- Console.WriteLine($"Profit: {all:F2} BGN, the gift has been purchased.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement