Advertisement
dragonbs

FoodDelivery

Sep 15th, 2022
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.99 KB | None | 0 0
  1. using System;
  2.  
  3. namespace _07.FoodDelivery
  4. {
  5.     internal class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double chickenMenu = 10.35;
  10.             double fishMenu = 12.4;
  11.             double vegMenu = 8.15;
  12.             double deliveryPrice = 2.5;
  13.  
  14.             int numberOfChickenMenus = int.Parse(Console.ReadLine());
  15.             int numberOfFishMenus = int.Parse(Console.ReadLine());
  16.             int numberOfVegMenus = int.Parse(Console.ReadLine());
  17.  
  18.             double priceForChickenMenu = numberOfChickenMenus * chickenMenu;
  19.             double priceForFishMenu = numberOfFishMenus * fishMenu;
  20.             double priceForVegMenu = numberOfVegMenus * vegMenu;
  21.  
  22.             double priceForAllMenus = priceForChickenMenu + priceForFishMenu + priceForVegMenu;
  23.             double priceForDesert = priceForAllMenus * 0.2;
  24.  
  25.             double allSum = priceForAllMenus + priceForDesert + deliveryPrice;
  26.  
  27.             Console.WriteLine(allSum);
  28.         }
  29.     }
  30. }
  31.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement