Answer to Question #247060 in C for Shoaib

Question #247060

Write a C program that prompt a user to input radius and calculate the circumference of the circle.


1
Expert's answer
2021-10-05T11:14:11-0400
#include <stdio.h>
#define PI 3.1415926

int main() {
    double r;
    double circum;

    printf("Eneter a radius: ");
    scanf("%lf", &r);
    circum = 2.0 * PI * r;
    printf("The circle circumference is %lf\n", circum);

    return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS