Thursday, 12 September 2013

c# - how to make this code as different manner?

c# - how to make this code as different manner?

Below code is my interview question but I don't know how to make perfect
Code:
public class Shape
{
public void Rectangle(int length, int height)
{
Console.Write(length * height);
}
public void Circle(int radius)
{
Console.Write(3.14 * (radius * radius));
}
}
Any ideas? Thanks in advance

No comments:

Post a Comment