Area of circle

Program:

#include<stdio.h>
int main()
{
float r,pi=3.14,a;
printf("Enter radius of circle: ");
scanf("%f",&r);
a=pi*r*r;
printf("Area of circle: %.2f\n",a);
return 0;
}

Output:


No comments:

Post a Comment

x^y using recursion

Program: #include<stdio.h> int power(int a,int b); int main() { int x,y,ans; printf("Enter x and y:\n "); scanf(...