Advertisement
Guest User

Shopping time

a guest
Oct 19th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 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 Shopping_time
  8. {
  9. class Program
  10. {
  11. static void Main(string[] args)
  12. {
  13. int brakeTime = int.Parse(Console.ReadLine());
  14. double pricePerPart = double.Parse(Console.ReadLine());
  15. double pricePerProgram = double.Parse(Console.ReadLine());
  16. double priceFrape = double.Parse(Console.ReadLine());
  17.  
  18. int freeTime = brakeTime - (5 + 6 + 4);
  19. double moneyPart = 3 * pricePerPart;
  20. double moneyPrograms = 2 * pricePerProgram;
  21. double allMoney = moneyPart + moneyPrograms + priceFrape;
  22.  
  23. Console.WriteLine($"{allMoney:f2}");
  24. Console.WriteLine(freeTime);
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement