comp

can someone please tell me what im doing wrong here please???im really bad at this. thanx



#include <iostream>

using std::cout;
using std::cin;
using std::endl;
using std::fixed;

#include <iomanip>
using std::setprecision;

#include <algorithm>
using std::max_element;
using std::min_element;

int main()
{
double score;
double subtotal;
double final;

double array [6];// create an array to hold the score entered by the user
int array_size=;//the size of the array
subtotal=0;//initialize final
scorecounter=1;//initialize loop counter





while (scorecounter<=5){//loop 6 times
cout<<"Enter individual judges score:";//promp for input
cin>>score;//read score

array [scorecounter-1]=score;
subtotal=subtotal+score;//add score to subtotal
scorecounter=scorecounter +1;//add one to counter

}

//Termination Phase

double max=*max_element( array,array+array_size);
double min=*min_element( array,array+array_size);

final=subtotal-max-min;//drop highest and lowest score


//Display Result


cout<<"Final score is"<<final<<endl;

return 0;

}
Well I have no idea what you are doing wrong so what's the actual problem? You can't just throw the code at people and say "fix it". A situation or issue would be helpful. At least tell us if you are getting any errors. Read this before you continue: http://www.cplusplus.com/forum/beginner/1/
In addition, you need to put that in code tags and indent it properly.
you never define array_size
your loop loops only 5 times
Topic archived. No new replies allowed.