Define value of pi and find radius
Dear Student here you learn How to find Define value of pi and find radius using C, Here we only provide a demo for your Understanding, now try it in your Way.
Wap in C to find Radius of Circle
#include <stdio.h> #define pi 3.14 int main() { int r; float area,result; printf("Enter radius = "); scanf("%d",&r); area=pi*r*r; result=area/1000000; printf(" Area = %f",area); printf("\n The area is equal to %fKm²", result); return result; }
Output
Enter Radius =
2nd Run (Now Input the Value of Radius)
Draw Rainbow in C using Graphics (click)