2. (B) Write a program to find the area of rectangle, square and circle.

2. (B) Write a program to find the area of rectangle, square and circle.

Write a program to find the area of rectangle, square and circle.



#include<stdio.h>
int main() {
float radius, area;
printf("\nEnter the radius of Circle : ");
scanf("%d", &radius);
area = 3.14 * radius * radius;
printf("\nArea of Circle : %f", area);
return (0);
}

#include<stdio.h>

int main() {
int side, area;
printf("\nEnter the Length of Side : ");
scanf("%d", &side);
area = side * side;
printf("\nArea of Square : %d", area);
return (0);
}
#include<stdio.h>
#include<conio.h>
int main() {
int length, breadth, area;
printf("\nEnter the Length of Rectangle : ");
scanf("%d", &length);
printf("\nEnter the Breadth of Rectangle : ");
scanf("%d", &breadth);
area = length * breadth;
printf("\nArea of Rectangle : %d", area);
return (0);
}
2. (B) Write a program to find the area of rectangle, square and circle. 2. (B) Write a program to find the area of rectangle, square and circle. Reviewed by admin on December 23, 2019 Rating: 5

No comments:

Powered by Blogger.