Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions C/program-61/program.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include<stdio.h>
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();

}
16 changes: 16 additions & 0 deletions C/program-63/program.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include<stdio.h>
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();

}