SHARE
TWEET

Untitled

a guest Jan 24th, 2020 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using System;
  2.  
  3. namespace WaterOveflow
  4. {
  5.     class Program
  6.     {
  7.         static void Main(string[] args)
  8.         {
  9.             double numberOfKegs = double.Parse(Console.ReadLine());
  10.             string currentKeg = "";
  11.             double biggestKeg = double.MinValue;
  12.  
  13.  
  14.             for (int i = 0; i < numberOfKegs; i++)
  15.             {
  16.                 string modelOfKeg = Console.ReadLine();
  17.                 double radius = double.Parse(Console.ReadLine());
  18.                 double height = double.Parse(Console.ReadLine());
  19.                
  20.                
  21.                
  22.  
  23.                double volume = Math.PI * radius * radius * height;
  24.                
  25.                 if(volume > biggestKeg)
  26.                 {
  27.                     biggestKeg = volume;
  28.                     currentKeg = modelOfKeg;
  29.                 }
  30.             }
  31.             Console.WriteLine(currentKeg);
  32.         }
  33.     }
  34. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top