Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.IO.IsolatedStorage;
- using System.Linq;
- namespace _02._Odd_Occurrences
- {
- class Program
- {
- static void Main(string[] args)
- {
- int countChickenMenu = int.Parse(Console.ReadLine()); //10.35
- int countFishMenu = int.Parse(Console.ReadLine()); //12.40
- int countVegetarianMenu = int.Parse(Console.ReadLine()); //8.15
- //Сума за менютата = сума от пилешки (бр. пил * 10.35)
- //+ сума от рибешките (бр.риб * 12.40)
- //+ сума от вегетарианските (бр. вег * 8.15)
- double sumMenus = countChickenMenu * 10.35 + countFishMenu * 12.40 + countVegetarianMenu * 8.15;
- //десерт = 20 % от сумата за менютата
- double dessertPrice = 0.2 * sumMenus;
- //обща сума = сума от менютата + цена за десерт + доставка
- double totalSum = sumMenus + dessertPrice + 2.50;
- Console.WriteLine($"Total: {totalSum:F2}");
- }
- }
- }
Add Comment
Please, Sign In to add comment