Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp1
- {
- class Program
- {
- static void Main(string[] args)
- {
- var n = int.Parse(Console.ReadLine());
- string max = " ";
- double maxSum = double.MinValue;
- double sum = 0.0;
- double pi = Math.PI;
- for (int i = 1; i <= n; i++)
- {
- string name = Console.ReadLine();
- var r = double.Parse(Console.ReadLine());
- var h = int.Parse(Console.ReadLine());
- sum = pi * r * r * h;
- if(sum > maxSum)
- {
- maxSum = sum;
- max = name;
- }
- }
- Console.WriteLine(max);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement