Answer to Question #303854 in C for Chris

Question #303854

Write a C program that is going to use function to calculate the perimeter of a circle

1
Expert's answer
2022-02-28T13:55:14-0500
#include <stdio.h>

double perimeter(double r) {
  return 2 * 3.1415 * r;
}

int main() {
  double r;
  scanf("%f", &r);
  printf("radius=%.3f", perimeter(r));
  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