Input Radius Of A Circle And Find It's Area And Circumference

Input Radius Of A Circle And Find It's Area And Circumference

Code
// Input radius of a circle and find its area and circumference.

#include <stdio.h>
int main()
{
    float rad;
    printf("Please Enter The Radius Of The Circle: ");
    scanf("%f", &rad);
    printf("Area Of Circle Is: %.2f\nCircumference Of The Circle: %.2f", 3.14 * rad * rad, 2 * 3.14 * rad);
    return 0;
}
Output
Please Enter The Radius Of The Circle: 7 
Area Of Circle Is: 153.86
Circumference Of The Circle: 43.96

Post a Comment