Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Diagnostics.CodeAnalysis;
- using System.Linq;
- using System.Threading;
- namespace ConsoleApp1
- {
- class Exam
- {
- static void Main(string[] args)
- {
- int times = int.Parse(Console.ReadLine());
- string bestKeg = string.Empty;
- double maxKeg = 0;
- for (int i = 0; i < times; i++)
- {
- string kegType = Console.ReadLine();
- double radius = double.Parse(Console.ReadLine());
- int height = int.Parse(Console.ReadLine());
- double formula = 3.14 * radius * radius * height;
- if (formula > maxKeg)
- {
- maxKeg = formula;
- bestKeg = kegType;
- }
- }
- Console.WriteLine(bestKeg);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement