Sunday, 22 September 2013

TO FIND AREA AND CIRCUMFRENCE OF CIRCLE USING C LANGUAGE



//Area And Circumference of circle

#include<conio.h>
#include<stdio.h>

void main()
{
int r;
float a,c,pi=3.14;
//Enter Radius
printf("\n\nEnter Radius :");
scanf("%d",&r);
//calculating area and circumference
a=pi*r*r;
c=2*pi*r;
//Display
printf("\n\nArea :%f",a);
printf("\n\nCircumference :%f",c);

getch();
}


OUTPUT



TO ADD TWO NUMBER IN C PROGRAM



FILE ->NEW

#include<stdio.h>
#include<conio.h>
void main()
    {
int a,b,c;
scanf("%d%d",&a,&b);
c=a+b;
printf("%d",c)
;
getch();
}


OUTPUT