Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- string frut = Console.ReadLine();
- string day = Console.ReadLine();
- double broi = double.Parse(Console.ReadLine());
- switch (day)
- {
- case ("Monday"):
- case ("Tuesday"):
- case ("Wednesday"):
- case ("Thursday"):
- case ("Friday"):
- switch (frut)
- {
- case ("banana"):
- double sum = broi * 2.50;
- Console.WriteLine($"{sum:f2}");
- break;
- case ("apple"):
- double sum1 = broi * 1.20;
- Console.WriteLine($"{sum1:f2}");
- break;
- case ("orange"):
- double sum2 = broi * 0.85;
- Console.WriteLine($"{sum2:f2}");
- break;
- case ("grapefruit"):
- double sum3 = broi * 1.45;
- Console.WriteLine($"{sum3:f2}");
- break;
- case ("kiwi"):
- double sum4 = broi * 2.70;
- Console.WriteLine($"{sum4:f2}");
- break;
- case ("pineapple"):
- double sum5 = broi * 5.50;
- Console.WriteLine($"{sum5:f2}");
- break;
- case ("grapes"):
- double sum6 = broi * 3.85;
- Console.WriteLine($"{sum6:f2}");
- break;
- default:
- Console.WriteLine("error");
- break;
- }
- break;
- case ("Saturday"):
- case ("Sunday"):
- switch (frut)
- {
- case ("banana"):
- double sum = broi * 2.70;
- Console.WriteLine($"{sum:f2}");
- break;
- case ("apple"):
- double sum5 = broi * 1.25;
- Console.WriteLine($"{sum5:f2}");
- break;
- case ("orange"):
- double sum4 = broi * 0.90;
- Console.WriteLine($"{sum4:f2}");
- break;
- case ("grapefruit"):
- double sum3 = broi * 1.60;
- Console.WriteLine($"{sum3:f2}");
- break;
- case ("kiwi"):
- double sum6 = broi * 3.00;
- Console.WriteLine($"{sum6:f2}");
- break;
- case ("pineapple"):
- double sum2 = broi * 5.60;
- Console.WriteLine($"{sum2:f2}");
- break;
- case ("grapes"):
- double sum1 = broi * 4.20;
- Console.WriteLine($"{sum1:f2}");
- break;
- default:
- Console.WriteLine("error");
- break;
- }
- break;
- default:
- Console.WriteLine("error");
- break;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement