1
0
Fork 0
This repository has been archived on 2021-11-03. You can view files and clone it, but cannot push or open issues or pull requests.
uni-m.cds-adv-prog/ex2/ex2.4/max.cc

21 lines
247 B
C++
Raw Normal View History

//max.cc
namespace mylib {
double max( double a, double b ) {
if ( a < b ) {
return b;
}
return a;
}
int max( int a[], int size ) {
int m = a[0];
for( int i = 1; i < size ; ++i ) {
m = max(a[i], m);
}
return m;
}
}