I need to write a program that prompts the user for 10 grades and then find the average. I have that part but I need to average to not include -1. How can I tell the program to not calculate -1 into the average.
#include <iostream>
using namespace std;
int main()
{
//Declare variables
float grade[10]; // 10 array slots
int count;
float total = 0;
double average;
for (count = 1; count <= 10; count++)
total = total + grade[count];
average = total / 10;
cout << "Average Grade: " << average << "%" << endl; //Output of average