Advertisement
miglenabs

Untitled

Nov 2nd, 2021
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Supplies_for_School
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8. {
  9. int pensQuantity = int.Parse(Console.ReadLine());
  10. int markersQuantity = int.Parse(Console.ReadLine());
  11. int preparQuantity = int.Parse(Console.ReadLine());
  12. int percentDiscount = int.Parse(Console.ReadLine());
  13.  
  14.  
  15.  
  16. double pensPrice = pensQuantity * 5.80;
  17. double markersPrice = markersQuantity * 7.20;
  18. double preparPrice = preparQuantity * 1.20;
  19. double discount = 0.25;
  20.  
  21.  
  22.  
  23. double materialsSum = pensPrice + markersPrice + preparPrice;
  24. double discountSum= materialsSum- (materialsSum*discount);
  25.  
  26.  
  27.  
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35. Console.WriteLine(discountSum);
  36.  
  37.  
  38. }
  39. }
  40. }
  41.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement