- //9_1
- (1)
- #include <iostream.h>
- const size=10;
- void findmax(int* a, int n, int i, int& pk);
- void main()
- {
- int a[size];
- int n=0;
- cout <<"please input " <<size <<"datas:n";
- for(int i=0; i<size; i++)
- cin >>a[i];
- findmax(a, size, 0, n);
- cout <<"the maximum is " <<a[n] <<endl
- <<"It's index is " <<n <<endl;
- }