From 941b031282651d12935234daf193f5e95ad47184 Mon Sep 17 00:00:00 2001 From: Gilbert Raju <32704517+gilbertraju@users.noreply.github.com> Date: Sat, 3 Oct 2020 11:37:27 +0530 Subject: [PATCH 1/2] Create program.c Area of CIrcle and Circcumferance --- C/program-61/program.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 C/program-61/program.c 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(); + +} From 18bfadb6568461948ed864a1163324350e59451d Mon Sep 17 00:00:00 2001 From: Gilbert Raju <32704517+gilbertraju@users.noreply.github.com> Date: Sat, 3 Oct 2020 11:46:47 +0530 Subject: [PATCH 2/2] Create program.c --- C/program-63/program.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 C/program-63/program.c 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(); + +}