Advertisement
SomeoneX

01. Christmas Sweets

Nov 29th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 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 _01.Christmas_Sweets
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. double baklavaPrice = double.Parse(Console.ReadLine());
  14. double muffinPrice = double.Parse(Console.ReadLine());
  15. double shtolenKG = double.Parse(Console.ReadLine());
  16. double candyKG = double.Parse(Console.ReadLine());
  17. int biscuitsKG = int.Parse(Console.ReadLine());
  18.  
  19. double shtolenPrice = baklavaPrice + baklavaPrice * 0.60;
  20. double shtolenSum = shtolenKG * shtolenPrice;
  21.  
  22. double candyPrice = muffinPrice + muffinPrice * 0.80;
  23. double candySum = candyKG * candyPrice;
  24.  
  25. double biscuitSum = biscuitsKG * 7.50;
  26.  
  27. double finalSum = shtolenSum + candySum + biscuitSum;
  28.  
  29. Console.WriteLine($"{finalSum:F2}");
  30. }
  31. }
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement