Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace exampreparation
- {
- class exam
- {
- static void Main(string[] args)
- {
- string flowerType = Console.ReadLine();
- int flowers = int.Parse(Console.ReadLine());
- string season = Console.ReadLine();
- double quantity = 0;
- if (season == "Spring")
- {
- if (flowerType == "Sunflower" || flowerType == "Mint")
- {
- quantity = 10;
- }
- else if (flowerType == "Daisy" || flowerType == "Lavender")
- {
- quantity = 12;
- }
- }
- else if (season == "Summer")
- {
- if (flowerType == "Sunflower" || flowerType == "Daisy" || flowerType == "Lavender")
- {
- quantity = 8;
- }
- else
- {
- quantity = 12;
- }
- }
- else
- {
- if (flowerType == "Sunflower")
- {
- quantity = 12;
- }
- else
- {
- quantity = 6;
- }
- }
- if (season == "Spring")
- {
- if (flowerType == "Daisy" || flowerType == "Mint")
- {
- quantity *= 1.10;
- }
- }
- double beeWork = flowers * quantity;
- if (season == "Summer")
- {
- beeWork *= 1.10;
- }
- else if (season == "Autumn")
- {
- beeWork *= 0.95;
- }
- Console.WriteLine($"Total honey harvested: {beeWork:f2}");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement