Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace PaintingEggs
- {
- class Program
- {
- static void Main(string[] args)
- {
- string size = Console.ReadLine();
- string color = Console.ReadLine();
- int volume = int.Parse(Console.ReadLine());
- double sum = 0;
- switch (size)
- {
- case "Large":
- if (color == "Red")
- {
- sum += 16;
- }
- else if (color == "Green")
- {
- sum += 12;
- }
- else if (color == "Yellow")
- {
- sum += 9;
- }
- break;
- case "Medium":
- if (color == "Red")
- {
- sum += 13;
- }
- else if (color == "Green")
- {
- sum += 9;
- }
- else if (color == "Yellow")
- {
- sum += 7;
- }
- break;
- case "Small":
- if (color == "Red")
- {
- sum += 9;
- }
- else if (color == "Green")
- {
- sum += 8;
- }
- else if (color == "Yellow")
- {
- sum += 5;
- }
- break;
- }
- double total = sum * volume * 0.65;
- Console.WriteLine($"{total:F2} leva.");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement