Saturday, March 6, 2021

C program to get radius of a circle and then print its circumference.

 

1.     Write a C program to get radius of a circle and then print its circumference.

 

#include<stdio.h>

#include<conio.h>

int main()

{

float r, c;

printf("Enter radius: ");

scanf("%f", &r);

c=2*(22/7)*r;

printf("Circumference of circle= %.2f", c);

return 0;

}

No comments:

Post a Comment