64 638
Assignments Done
99,2%
Successfully Done
In September 2018

Answer to Question #31598 in C++ for MANMOHAN SHARMA

Question #31598
2. "Write a function for finding out highest and lowest marks obtained by a student from an array contained student name and marks".

For Example :

GetHighestLowestMarks{Student{n}, Marks{n}} returns an arraycontain student name and marks.
Expert's answer
#include <iostream>

using namespace std;
int fun()
{
& int a[10];
& cout<<"enter student name"<<endl;
& char r[10];
& cin>>r;
& cout<<"enter 10 student marks"<<endl;

for(int i=0;i<10;i++){
cin>>a[i];
}


& int max=0;
& int min;
& for(int j=0;j<10;j++)
& {

if (min>a[j]) {min=a[j];}

if (max<a[j]) {max=a[j];}

& }
& cout<<endl<<r<<endl<<"min= "<<min<<endl<<"max= "<<max<<endl;
}
int main()
{
fun();

return 0;
}


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