diff --git a/Hacktoberfest2022/min_max_function.cpp b/Hacktoberfest2022/min_max_function.cpp new file mode 100644 index 0000000..eb446fc --- /dev/null +++ b/Hacktoberfest2022/min_max_function.cpp @@ -0,0 +1,44 @@ +#include +using namespace std; + +int getMin(int num[], int n) { + + int min = INT_MAX; + + for(int i = 0; imax){ + max=num[i]; + } + } + //rwturn max value + return max; +} + +int main(){ + + int size; + cin>>size; + + int num[100]; + + //taking input in array + for(int i=0; i>num[i]; + } + cout<<"Maximum value is"<