Tuesday, 23 October 2012

The length & breadth of a rectangle and radius of a circle are input through the keyboard. Write a program to calculate the area & perimeter of the rectangle, and the area & circumference of the circle.

using System;
class Program5
 public static void Main()
  double l,b,r,A_r,P_r,A_c,C_c;
 Console.Write("Enter length and breadth of a rectangle in cm\n");
 Console.Write("Area of rectangle = {0} sq.cm\nPerimeter of rectangle = {1} cm\n",A_r,P_r);
 Console.Write("Enter radius of circle in cm\n");
 Console.Write("Area of Circle = {0} sq.cm\nCircumference of circle = {1} cm\n",A_c,C_c);


No comments:

Post a Comment