trouble creating an array
I'm trying to write an array that prompts for 20 grades. I then want to calculate the average and then list the grades in the order they were entered and how many points (+ or -) the individual grade was from the average. I've started the first part but now I'm stuck how to output the corrct way using an array. Here is what I have so far:
Code:
#include<iostream.h>
#include<stdlib.h>
int main()
{
float grade, average, total;
float x[21}
for (int i=0; i<=20; i++)
{
cout<<"Enter grade:";
cin>>x[i];
}
total=total+grade;
count=count+1;
average=total/20;