Advertisement
svetlyoek

Untitled

Jan 30th, 2019
154
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 ConsoleApp148
  4. {
  5. class Program
  6. {
  7. static void Main(string[] args)
  8.  
  9. {
  10. int counter = int.Parse(Console.ReadLine());
  11. double volume = 0;
  12. double bigestVolume = double.MinValue;
  13. string bigestKegModel = "";
  14. for (int i = 1; i <= counter; i++)
  15. {
  16. string model = Console.ReadLine();
  17. double radius = double.Parse(Console.ReadLine());
  18. int height = int.Parse(Console.ReadLine());
  19. volume = ((Math.PI * (radius*radius)) * height);
  20.  
  21.  
  22.  
  23. if (volume > bigestVolume)
  24. {
  25. bigestVolume = volume;
  26. bigestKegModel = model;
  27. }
  28.  
  29. }
  30. Console.WriteLine($"{bigestKegModel}");
  31.  
  32. }
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement