//average- averages a set of scores entered
// by user using a aray
//
#include <cstdio>
#include <cstdlib>
#include <iostream>
usingnamespace std;
int display_aray (nScores [100])
{
int ncount;
for (ncount=0;int nScores[ncount]>=0;ncount++)
{
cout.width(3);
cout<<i<<" - "<<nScores[ncount]<<endl;
}
}
break;
}
int ( nScores)
{
for (int n=0;nScores [n]=>0; n++)
{
cout <<"enter score:"<<endl;
cin >>nScores [n];
}
return n,nScores[];
}
int main (int nNumberofArgs, char* pszArgs [])
{
//tell the user what the program does and how to use it
cout <<"this program averages a set of scores entered by user '\n'"<<
" to finnish entering the scores enter a negative number"<<endl;
int nScores[100];
int (int nScores[])
for (int nAccumulater=0,int nCount=0;nScores[nAccumulater]=>0;nCount++)
{
nAccumulater+=nScores[nCount];
}
int average;
average=nAccumulater/n;
cout <<"input terminated '\n' input data:'\n'"<<endl;
int display_aray (int nScores [100])
cout <<"the average is:'\n'"<<average<<endl;
return 0;
}
note: im a real newbie to this stuff so if you could please
explain very simply and explain why i would be really appreciative
thanks in advance!
the errors are like this
C:\Beginning_Programing-CPP\averages\main.cpp|9|error: 'nScores' was not declared in this scope|
C:\Beginning_Programing-CPP\averages\main.cpp|11|error: expected ',' or ';' before '{' token|
||=== Build finished: 2 errors, 0 warnings ===|