Answer to Question #14274 in C++ for zyrus santillan
4. Write a C++ program that would input 10 scores and output the Highest and Lowest score.
1
2012-09-06T10:54:23-0400
#include <iostream>
using namespace std;
int main()
{
int a[10],max,min;
for (int i=0; i<10;i++){
cout<<"\n& "<<i+1<<" Enter the score : ";
cin>>a[i];
& }
max=min=a[0];
for (int i=0; i<10;i++){
if (max<a[i])
max=a[i];
if (min>a[i])
min=a[i];
& }
cout<<"max = "<<max<< " \n";
cout<<"min = "<<min<< " \n\n\n";
system("PAUSE");
}
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Learn more about our help with Assignments:
C++
Comments
Leave a comment