It seems like your asking for an array (line 11) and printing an array (line 17)...
According to my knowledge it isn't possible to print or ask an array in that way...
But ofcourse I might be totally wrong, suggestion: try it using 'int' or 'struct'
return 0 thanks for the code but its still doesnt work
What's wrong with the code snippet?
Note that this code
1 2 3 4 5 6
for (int j=0;j<20;j=j+5)
{
cout<<"\nYour grade now is: "<<grade[j];
}
Will only output every 5th grade. If your trying to output all of them you need to change it to: for (int j = 0; j < 20; j++ )
It seems like your asking for an array (line 11) and printing an array (line 17)...
According to my knowledge it isn't possible to print or ask an array in that way...
But ofcourse I might be totally wrong, suggestion: try it using 'int' or 'struct'
What? There's nothing wrong with the way the OP is reading in or outputting the numbers.
Is it because the only variable you declare is the grade[] array? It looks like akosinoah copy pasted his entire program so the int 'j' and\or 'i' are never declared within ANY part of the program.