Advertisement
NadyaMisheva

v na cilindur

Mar 17th, 2019
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.49 KB | None | 0 0
  1. using System;
  2. using System.Linq;
  3. using System.Collections.Generic;
  4.  
  5. public class Program
  6. {
  7. public static void Main()
  8. {
  9. string[] input = Console.ReadLine().Split(',');
  10. double r1 = double.Parse(input[0])/10;
  11. double h1 = double.Parse(input[1])/10;
  12. double r2 = double.Parse(input[2])/10;
  13. double h2 = double.Parse(input[3])/10;
  14.  
  15. double V1 = Math.PI * r1 * r1 * h1;
  16. double V2 = Math.PI * r2 * r2 * h2;
  17.  
  18. Console.WriteLine("{0:F2}", Math.Max(V1, V2));
  19. }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement