0% found this document useful (0 votes)
12 views1 page

Find Min Max by Reference

Uploaded by

markoskadiu7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views1 page

Find Min Max by Reference

Uploaded by

markoskadiu7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

//#include <iostream>

//using namespace std;


//
//int minnum(int arr[],int size) {
// int min = arr[0];
// for (int i = 0; i < size; i++)
// {
// if (arr[i] < min) {
// min = arr[i];
// }
// }
// return min;
//}
//int maxnum(int arr[], int size) {
// int max = arr[0];
// for (int i = 0; i < size; i++)
// {
// if (arr[i] > max) {
// max = arr[i];
// }
// }
// return max;
//}
//void minmax(int arr[], int size, int* min , int* max) {
// for (int i = 0; i < size; i++)
// {
// if (arr[i] > *max) {
// *max = arr[i];
// }
// if (arr[i] < *min) {
// *min = arr[i];
// }
// }
//}
//
//int main() {
//
// int num[5] = { 5,4,-2,29,6 };
// /*cout << " Numri me i vogel eshte: " << minnum(num, 5) << endl;
// cout << " Numri me i madh eshte: " << maxnum(num, 5)<<endl;*/
// int min = num[0];
// int max = num[0];
// minmax(num, 5, &min, &max);
// cout << "min is:" << min << " max is:" << max;
// return 0;
// }

You might also like