// P05.cpp
#include <iostream>
using namespace std;
int maximo(int * p);
int main(){
int edades[] = {22, 19, 17, 23, 18, 0};
cout<<"edad maxima: "<<maximo(edades)<<endl;
}
int maximo(int * p){
if(*p == 0)
return 0;
int max = *p;
while(*++p != 0){
if(*p > max)
max = *p;
}
return max;
}