Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace _3
- {
- class Program
- {
- static void Main(string[] args)
- {
- string sizeEgg = Console.ReadLine();
- string colorEgg = Console.ReadLine();
- int partida = int.Parse(Console.ReadLine());
- double total = 0;
- if ((sizeEgg == "Large") && (colorEgg == "Red"))
- {
- double pricePartida = partida * 16;
- double costs = 0.35 * pricePartida;
- total = pricePartida - costs;
- break;
- }
- else if ((sizeEgg == "Medium") && (colorEgg == "Green"))
- {
- double pricePartida = partida * 9;
- double costs = 0.35 * pricePartida;
- total = pricePartida - costs;
- break;
- }
- else if ((sizeEgg == "Small") && (colorEgg == "Yellow"))
- {
- double pricePartida = partida * 5;
- double costs = 0.35 * pricePartida;
- total = pricePartida - costs;
- break;
- }
- Console.WriteLine($"{total:F2} leva.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement