
答案
#include
using namespace std;
int main()
{
void input(float score[], int n);
float smax(float score[], int n);
float s[10];
input(s,10);
cout << "The highest score: " << smax(s,10) << endl;
return 0;
}
void input(float score[], int n)
{
for (int i = 0; i < n; i++)
cin >> score[i];
}
float smax(float score[], int n)
{
float max = score[0];
for( int i =1; i < n; i++)
if (score[i] > max)
max = score[i];
return max;
}