Advertisement
Guest User

Untitled

a guest
Apr 2nd, 2018
1,024
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Text.RegularExpressions;
  6. using System.Threading.Tasks;
  7.  
  8.  
  9. class Program
  10. {
  11. static void Main()
  12. {
  13. double priceCPU = double.Parse(Console.ReadLine()) * 1.57;
  14. double priceVGA = double.Parse(Console.ReadLine()) * 1.57;
  15. double priceRAM = double.Parse(Console.ReadLine()) * 1.57;
  16. int quantityRAM = int.Parse(Console.ReadLine());
  17. double discount = double.Parse(Console.ReadLine());
  18.  
  19. var price = (priceCPU - (priceCPU * discount)) + (priceVGA - (priceVGA * discount)) + (priceRAM * quantityRAM);
  20.  
  21. Console.WriteLine($"Money needed - {price:F2} leva.");
  22. }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement