Advertisement
viraco4a

Untitled

Mar 12th, 2018
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. using System;
  2.  
  3. namespace PCstore
  4. {
  5. class Program
  6. {
  7. static void Main()
  8. {
  9. decimal priceUSDofCPU = decimal.Parse(Console.ReadLine());
  10. decimal priceUSDofVideo = decimal.Parse(Console.ReadLine());
  11. decimal priceUSDofRAM = decimal.Parse(Console.ReadLine());
  12. int numberRAM = int.Parse(Console.ReadLine());
  13. decimal discount = decimal.Parse(Console.ReadLine());
  14. decimal currency = 1.57m;
  15. decimal totalPrice = ((priceUSDofCPU + priceUSDofVideo) * (1 - discount) + numberRAM * priceUSDofRAM) * currency;
  16. Console.WriteLine($"Money needed - {totalPrice:F2} leva.");
  17. }
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement