Try to first write a small program which takes in 10 values from the user and outputs the average. If you can get that to work, you will know how to fix your program ;)
#include <iostream>
#include <iomanip>
usingnamespace std;
int main()
{
float programgrade1, programgrade2, programgrade3,programgrade4,avg;
cout<<"Enter the grade for Program ";
cin>>programgrade1;
cout<<"Enter the grade for Program ";
cin>>programgrade2;
cout<<"Enter the grade for Program ";
cin>>programgrade3;
cout<<"Enter the grade for Program ";
cin>>programgrade4;
avg=(programgrade1+programgrade2+programgrade3+programgrade4)/4;
cout<<"AVG: "<<avg;
return 0;
}
THe sum should be calculated during the loop. The average should be calculated after the loop. Your code in your OP does not calculate the sum at all, and it tries to magically calculate the average inside the loop.
Where are you pulling these equations from? Taking the average of a data set is something you learn in elementary school - if you need a refreshed you can use Google. There is no 100 involved in the calculation.
these equations are from my assisgnment in school. in may not look like you are helping me but you are greatly. i have successfully gotten the program and test average working. and am figuring out the total average now which should be the easiest. sorry yea the equations fooled me for awhile too because they make no sense.
I'm glad you were able to figure it out, but it's rude to delete your post content. When other people who have the same problem come here it will be a waste of time for them. You're basically saying "only I deserve the answer to this problem", which is quite selfish even if you don't realize. In the future don't remove your post content like this.