Advertisement
IvanITD

07FoodDelivery

Jan 14th, 2024
642
0
Never
1
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.56 KB | Source Code | 0 0
  1. int chickenMenuAmount = int.Parse(Console.ReadLine());
  2. int fishMenuAmount = int.Parse(Console.ReadLine());
  3. int vegeterianMenuAmount = int.Parse(Console.ReadLine());
  4.  
  5. double chickenMenuPrice = chickenMenuAmount * 10.35;
  6. double fishMenuPrice = fishMenuAmount * 12.40;
  7. double vegeterianMenuPrice = vegeterianMenuAmount * 8.15;
  8.  
  9. double totalPricing = chickenMenuPrice + fishMenuPrice + vegeterianMenuPrice;
  10. double withDesert = totalPricing * 0.20;
  11.  
  12. double delivery = 2.50;
  13.  
  14. double finalPrice = totalPricing + withDesert + delivery;
  15.  
  16. Console.WriteLine(finalPrice);
Tags: C#
Advertisement
Comments
Add Comment
Please, Sign In to add comment
Advertisement