write the program in c++ Pointen & A???ys: Write u function that is passed a poi
ID: 658675 • Letter: W
Question
write the program in c++
Explanation / Answer
float *maxp(float *ap,int size)
{
float * max;
max=ap;
for(int i=1;i<size;i++)
{
if(* max<ap[i])
max=ap+i;
}
return max;
}
void main()
{
float array[10];
flaot * max;
cout<<"enter the elements";
for(int i=0;i<10;i++)
cin>>array[i];
max=maxp(array,10)
cout<<"the maximum element of the array is"<<*max;
cout<<"enter the elements";
for(int i=0;i<10;i++)
cin>>array[i];
max=maxp(array,10)
cout<<"the maximum element of the array is"<<*max;
getch();
}
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.