C program to find the min and max number from a given array
kw.c
#include<stdio.h>intmain(){intmin,max;intarr[5]={100,15,8,45,93};min=max=arr[0];for(inti=0;i<5;i++){if(arr[i]>max)max=arr[i];if(arr[i]<min)min=arr[i];}printf("The max number from a given array is %d ",max);printf("The min number from a given array is %d ",min);return0;}
Output
kodingwindow@kw:~$ gcc kw.c kodingwindow@kw:~$ ./a.out
The max number from a given array is 100
The min number from a given array is 8
kodingwindow@kw:~$
Dear User, Thank you for visitng KodingWindow. If you are interested in technical articles, latest technologies, and our journey further, please follow us on LinkedIn.
Dear User, We are grateful for your interest in the KodingWindow Android app. We intend to soon make it available on the Google Play Store. Currently, you need to install apk manually. Would you like to get the app? Minimum Requirement(s): Android 10