View difference between Paste ID: hL2VZrqm and 1eKQ7KDA
SHOW: | | - or go back to the newest paste.
1
using System;
2
using System.Collections.Generic;
3
using System.Linq;
4
using System.Text;
5
using System.Threading.Tasks;
6
7
namespace ConsoleApp14
8
{
9
    class Program
10
    {
11
        static void Main(string[] args)
12
        {
13
            double money = double.Parse(Console.ReadLine());
14
            double profitDay = double.Parse(Console.ReadLine());
15
            double expence = double.Parse(Console.ReadLine());
16
            double gift = double.Parse(Console.ReadLine());
17
18
            double profitWeek = (money * 5 + profitDay * 5) - expence;
19
20
            if (profitWeek>=gift)
21
            {
22
                Console.WriteLine($"Profit: {profitWeek} BGN, the gift has been purchased.");
23
            }
24
            else if (profitWeek<gift||profitWeek==0)
25
            {
26
                Console.WriteLine($"Insufficient money: {Math.Abs(profitWeek-gift):f2} BGN.");
27
            }
28
        }
29
    }
30
}