Advertisement
Spocoman

Bracelet Stand

Dec 11th, 2021
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.75 KB | None | 0 0
  1. using System;
  2.  
  3. namespace BraceletStand
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double dayCash = double.Parse(Console.ReadLine()) * 5;
  10.             double dayProfit = double.Parse(Console.ReadLine()) * 5;
  11.             double cost = double.Parse(Console.ReadLine());
  12.             double giftPrice = double.Parse(Console.ReadLine());
  13.             double total = dayCash + dayProfit - cost;
  14.             if (total >= giftPrice)
  15.             {
  16.                 Console.WriteLine($"Profit: { total:f2} BGN, the gift has been purchased.");
  17.             }
  18.             else
  19.             {
  20.                 Console.WriteLine($"Insufficient money: {giftPrice - total:f2} BGN.");
  21.             }
  22.         }
  23.     }
  24. }
  25.  
  26.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement