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);
1 Answer
+ 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)