From eb6ce9688ef62983d1a34fb4acdb825747b6733f Mon Sep 17 00:00:00 2001 From: Tanushree Aggarwal <47485195+shreetanu@users.noreply.github.com> Date: Thu, 1 Oct 2020 00:30:28 +0530 Subject: [PATCH 1/3] Created program.c A program in C to find the minimum and maximum element in an array of size n. --- C/program-47/program.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 C/program-47/program.c diff --git a/C/program-47/program.c b/C/program-47/program.c new file mode 100644 index 00000000..04e8a3c6 --- /dev/null +++ b/C/program-47/program.c @@ -0,0 +1,23 @@ +#include +int main() +{ + + int a[100],n,min,max; + printf("enter the size of the array"); + scanf("%d",&n); + printf("enter the elements of the array"); + for(int i=0;imax) + max=a[i]; + if(a[i] Date: Thu, 1 Oct 2020 00:34:46 +0530 Subject: [PATCH 2/3] Created Readme.md --- C/program-47/Readme.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 C/program-47/Readme.md diff --git a/C/program-47/Readme.md b/C/program-47/Readme.md new file mode 100644 index 00000000..7606b07b --- /dev/null +++ b/C/program-47/Readme.md @@ -0,0 +1,9 @@ +Program 47 + +Write a program to find the maximum and minimum element in an array. + +Variable description-- +n=Number of elements in an array +a=Array of size N +min= Holds the minimum element +max=Holds the maximum element From 4500f8c4bee79992af4b7c70a992b4d0fddefbb8 Mon Sep 17 00:00:00 2001 From: Tanushree Aggarwal <47485195+shreetanu@users.noreply.github.com> Date: Thu, 1 Oct 2020 00:36:06 +0530 Subject: [PATCH 3/3] Update Readme.md --- C/program-47/Readme.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/C/program-47/Readme.md b/C/program-47/Readme.md index 7606b07b..dccb21a0 100644 --- a/C/program-47/Readme.md +++ b/C/program-47/Readme.md @@ -3,7 +3,11 @@ Program 47 Write a program to find the maximum and minimum element in an array. Variable description-- + n=Number of elements in an array + a=Array of size N + min= Holds the minimum element + max=Holds the maximum element