Advertisement
desislava_topuzakova

01. Conference Expenses

Dec 2nd, 2023
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.02 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace _05
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. //разходи: наем, напитки, кетъринг, подаръци
  14.  
  15. int rent = int.Parse(Console.ReadLine()); //наем за залата
  16. int catering = rent * 2; //цена за кетъринга
  17. double drinks = catering - 0.15 * catering; //цена за напитки
  18. double gifts = (catering + drinks) / 7; //цена за подаръци
  19.  
  20. //обща сума за разходи = наем за залата + цена за кетъринга + цена за напитки + цена за подаръци
  21. double totalSum = rent + catering + drinks + gifts;
  22.  
  23. //отпечатваме обща сума за разходи
  24. Console.WriteLine($"{totalSum:F2}");
  25.  
  26.  
  27. }
  28. }
  29. }
  30.  
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement