Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApp14
- {
- class Program
- {
- static void Main(string[] args)
- {
- double money = double.Parse(Console.ReadLine());
- double profitDay = double.Parse(Console.ReadLine());
- double expence = double.Parse(Console.ReadLine());
- double gift = double.Parse(Console.ReadLine());
- double profitWeek = (money * 5 + profitDay * 5) - expence;
- if (profitWeek>=gift)
- {
- Console.WriteLine($"Profit: {profitWeek} BGN, the gift has been purchased.");
- }
- else if (profitWeek<gift||profitWeek==0)
- {
- Console.WriteLine($"Insufficient money: {Math.Abs(profitWeek-gift):f2} BGN.");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment