Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace _07.VegetableShop
- {
- class Program
- {
- static void Main(string[] args)
- {
- //вход - OK
- //приход от плодовете = кол. плодове * цена за 1 кг плодове
- //приход от зеленчуци = кол, зеленчуци * цена за 1 кг зеленчуци
- //общ приход = приход от зеленчуци + приход от плодове (лева)
- //преобразуваме от лева в евро
- double priceKgVegetables = double.Parse(Console.ReadLine());
- double priceKgFruits = double.Parse(Console.ReadLine());
- int kgVegetables = int.Parse(Console.ReadLine());
- int kgFruits = int.Parse(Console.ReadLine());
- double profitFruits = kgFruits * priceKgFruits;
- double profitVegetables = kgVegetables * priceKgVegetables;
- double profitInLeva = profitFruits + profitVegetables;
- double profitInEuro = profitInLeva / 1.94;
- Console.WriteLine($"{profitInEuro:F2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment