public static void Main() { Circle smallCircle = new Circle(); Circle largeCircle = new Circle(); Circle normalCircle = new Circle(); smallCircle.Radius = .25; largeCircle.Radius = 3.75; Console.WriteLine(); Console.WriteLine(" The first circle has a radius of {0}, which means the area is {1}", smallCircle.Radius, smallCircle.Area.ToString("N2")); Console.WriteLine(); Console.WriteLine(" and the diameter is {0}", smallCircle.Diameter); Console.WriteLine(); Console.WriteLine(); Console.WriteLine(); Console.WriteLine(" The second circle has a radius of {0}, which means the area is {1}", largeCircle.Radius, largeCircle.Area.ToString("N2")); Console.WriteLine(); Console.WriteLine(" and the diameter is {0}", largeCircle.Diameter); Console.WriteLine(); Console.WriteLine(); Console.WriteLine(); Console.WriteLine(" The third circle has a radius of {0}, which means the area is {1}", normalCircle.Radius, normalCircle.Area.ToString("N2")); Console.WriteLine(); Console.WriteLine(" and the diameter is {0}", normalCircle.Diameter); Console.ReadLine(); }
public static void Main() { Circle Radii = new Circle(); Radii.Radius = 1; Circle Diametr = new Circle(); Diametr.Radius = 3; Circle circle = new Circle(); }
public static void Main() { Circle circle1 = new Circle(); circle1.Radius = 1; Circle circle2 = new Circle(); circle2.Radius = 3; Circle circle3 = new Circle(); //circle3.Radius = 1; Console.WriteLine("Circle 1 Radius:{0} Area:{1} Diameter:{2}", circle1.Radius, circle1.Area, circle1.Diameter); Console.WriteLine("Circle 2 Radius:{0} Area:{1} Diameter:{2}", circle2.Radius, circle2.Area, circle2.Diameter); Console.WriteLine("Circle 3 Radius:{0} Area:{1} Diameter:{2}", circle3.Radius, circle3.Area, circle3.Diameter); }