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
2019-11-26 10:55:12 +01:00

20 lines
247 B
C++
Executable file

//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;
}
}