Advertisement
Guest User

Untitled

a guest
Jan 24th, 2020
117
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement