Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace Moving
- {
- class Program
- {
- static void Main(string[] args)
- {
- int count = int.Parse(Console.ReadLine());
- double maxValue = double.MinValue;
- string bigModel = "";
- for (int i = 0; i < count; i++)
- {
- string model = Console.ReadLine();
- double radius = double.Parse(Console.ReadLine());
- int height = int.Parse(Console.ReadLine());
- double volume = Math.PI * (radius * radius) * height;
- if (volume > maxValue)
- {
- maxValue = volume;
- bigModel = model;
- }
- }
- Console.WriteLine(bigModel);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement