Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System+;
- class Garden
- {
- static void Main()
- {
- decimal tomatoSeed = decimal.Parse(Console.ReadLine()) * 0.5m;
- byte tomatoArea = byte.Parse(Console.ReadLine());
- decimal cucumberSeed = decimal.Parse(Console.ReadLine()) * 0.4m;
- byte cucumberArea = byte.Parse(Console.ReadLine());
- decimal potatoSeed = decimal.Parse(Console.ReadLine()) * 0.25m;
- byte potatoArea = byte.Parse(Console.ReadLine());
- decimal carrotSeed = decimal.Parse(Console.ReadLine()) * 0.6m;
- byte carrotArea = byte.Parse(Console.ReadLine());
- decimal cabbageSeed = decimal.Parse(Console.ReadLine()) * 0.3m;
- byte cabbageArea = byte.Parse(Console.ReadLine());
- decimal beansSeed = decimal.Parse(Console.ReadLine()) * 0.4m;
- Console.WriteLine("Total costs: " + (tomatoSeed + cucumberSeed + potatoSeed +
- carrotSeed + cabbageSeed + beansSeed));
- int beansArea = 250 - (tomatoArea + cucumberArea + potatoArea
- + carrotArea + cabbageArea);
- if(beansArea == 0)
- {
- Console.WriteLine("No area for beans");
- }
- else if(beansArea > 0)
- {
- Console.WriteLine("Beans area: " + beansArea);
- }
- else
- {
- Console.WriteLine("Insufficient area");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment