Find Area & Perimeter of Rectangle || Find Area & Circumference of Circle.
code:-
#include <stdio.h>
int main()
{
    float r, l, b, a, p, A, C;
    printf("Enter the length:");
    scanf("%f", &l);
    printf("Enter the breadth:");
    scanf("%f", &b);
    printf("The length value:%f\n", l);
    printf("The breadth value:%f", b);
    a = l * b;
    printf("\nThe area of rectangle is :%f", a);
    p = 2 * l + b;
    printf("\nThe perimeter of rectangle is: %f", p);
    printf("Enter the radius of the circle:");
    scanf("%f", &r);
    A = 3.142857142857143 * r * r;
    printf("The area of circle is:%f", A);
    C=2*3.142857142857143*r;
    printf("The circumference of the circle is:%f",C);
    return 0;
}


 
 
 
0 Comments