Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace GrangpaStavri
- {
- class Program
- {
- static void Main(string[] args)
- {
- int days = int.Parse(Console.ReadLine());
- double totalLiters = 0;
- double averageGradus = 0;
- for (int i = 0; i < days; i++)
- {
- double currentLiters = double.Parse(Console.ReadLine());
- double currentGradus = double.Parse(Console.ReadLine());
- averageGradus += currentLiters * currentGradus;
- totalLiters += currentLiters;
- }
- averageGradus /= totalLiters;
- Console.WriteLine($"Liter: { totalLiters:f2}");
- Console.WriteLine($"Degrees: { averageGradus:f2}");
- if (averageGradus < 38)
- {
- Console.WriteLine("Not good, you should baking!");
- }
- else if (averageGradus > 42)
- {
- Console.WriteLine("Dilution with distilled water!");
- }
- else
- {
- Console.WriteLine("Super!");
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment