1. Write a program to calculate the area of a circle where radius is passed as a parameter.
Class-10 Computer
#include<stdio.h>
inti main () {
float radius, area_circle;
// take radius as input
Printf (" Enter the radius of circle:");
Scanf ("%f", & radius);
area_circle = 3.14 * radius^2 ;
Printf (" Area of circle: %f", area_circle);
return 0 ;
}
0 Comments