Program
#include<stdio.h> int main() { float r,a,c; printf("**********************************************************"); printf("\n**********************************************************"); printf("\n** WAP to find area and circumference of a circle **"); printf("\n** Created by Sheetal Garg **"); printf("\n** Assistant Professor **"); printf("\n** Phone No:9467863365 **"); printf("\n**********************************************************"); printf("\n**********************************************************"); printf("\nenter the radius of circle \n "); scanf("%f",&r); a = 3.14*r*r; printf("the area of circle is %f \n",a); c = 2*3.14*r; printf("the circumference of circle is %f",c); return 0; }
Output
********************************************************** ********************************************************** ** WAP to find area and circumference of a circle ** ** Created by Sheetal Garg ** ** Assistant Professor ** ** Phone No:9467863365 ** ********************************************************** ********************************************************** enter the radius of circle 5 the area of circle is 78.500000 the circumference of circle is 31.400000