diff --git a/C/program-61/program.c b/C/program-61/program.c new file mode 100644 index 00000000..0bfbf2dc --- /dev/null +++ b/C/program-61/program.c @@ -0,0 +1,23 @@ +#include +void main() +{ + double r,area,circum;//Initializing varaibles + + printf("Enter Radius:"); + scanf("%lf",&r);//getting radius. + + if(r<10)//Checks if radius is less than 10 + { + circum = 2*3.14*r;//Circumference of a circle is 2*pi*r. + + printf("The Circumference of the Circle with the given radius is: %lf",circum);//printing Circumference + } + else//If r is NOT less that 10....i.e. r is greater than 10 + { + area = 3.14*r*r;//Area of a circle is pi*r*r. + + printf("The Area of the Circle with the given radius is: %lf",area);//printing The area + } + getch(); + +} diff --git a/C/program-63/program.c b/C/program-63/program.c new file mode 100644 index 00000000..b89e54f9 --- /dev/null +++ b/C/program-63/program.c @@ -0,0 +1,16 @@ +#include +void main() +{ + int n1,n2,n3,n4,n5; + float t; + + printf("Enter Five Numbers:"); + scanf("%d %d %d %d %d",&n1,&n2,&n3,&n4,&n5); + + t=(n1+n2+n3+n4+n5)/5; + + printf("The Average of %d,%d,%d,%d,%d is %f",n1,n2,n3,n4,n5,t); + + getch(); + +}