64 752
Assignments Done
99,3%
Successfully Done
In September 2018

Answer to Question #14274 in C++ for zyrus santillan

Question #14274
4. Write a C++ program that would input 10 scores and output the Highest and Lowest score.

Expert's answer
#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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions