Sunday, March 24, 2019

Write a Program For Calculate Area and Circumference of Circle



BACHELOR OF COMPUTER APPLICATION (B.C.A.) FIRST SEMESTER



Here you will get simple C program 
C Language Program for Calculate Area and Circumference of Circle.
IT IS THE SMALLEST LOGIC USED FOR CODING OF THIS PROGRAM.
IN WHICH YOU CAN CREATE OWN VARIABLES AND FUNCTIONS.
User will input only one numbers and that is radius,
then their Area Circumference will be calculated and
finally it will be printed on screen.

The program coding is given below.
#include<stdio.h>
#include<conio.h>
void main()
{
 int r;
 float Area,Circum;
 clrscr();
 printf("Enter Radius=");
 scanf("%d",&r);
 Area=3.14*r*r;
 printf("Area of Cricle=%f\n",Area);
 Circum=2*3.14*r;
 printf("Circumference of Cricle=%f\n",Circum);
 getch();
}
Output will be given after you compile it.

No comments:

Post a Comment