0

Maybe can somebody optimize this?

const double pi = 3.14; double radius = Convert.ToDouble(Console.ReadLine()); double x = radius * radius; double y = x * pi; Console.WriteLine(y);

22nd Oct 2021, 11:27 PM
Марк
Марк - avatar
1 Antwort
+ 2
Your code is fine. If you wantedto shorten it a little, you could write something like Console.WriteLine(radius*radius*pi); (then you don't need x and y)
23rd Oct 2021, 8:47 AM
Lisa
Lisa - avatar