Undermine 31 Light Poster

that's dumb.

what if he wants to add 9999 as one of his numbers

Cool thanks for coming in offering no valuable input of your own just destructive criticism. If choosing 9999 is a problem he could use a different sent value it's just a suggestion.

Moron.

Undermine 31 Light Poster

I would do something different and use a sentinel value to terminate input. Loop until users stops the loop.

int value, count=0, sum=0, total;
    
    for(;;) // out forever loop
    {
        for(;;) // 
        {
            cout << "Enter value " << count+1 << ": ";
            value = -9999;
            cin >> value;
  
        
          
            cin.clear();
            cin.sync();

            if ( value == -9999 ) { cout << "Bad data entry ... "; continue; }
            if ( value ==  9999 ) break; // break out of inner loop
            
++count;

total= sum += value;
average= total/count;         
                       
                      
    
           
        } // end of inner forever loop ...
        
        if (value == 9999 ) break; // break out of outer loop
      
   
    
    } // end of outer forever loop ...
Undermine 31 Light Poster

Make sure you have the Ming compiler, and put the Dev c++ executable and the .cpp file into the same folder.

Then try execute --> rebuild all.

then if still nothing, uninstall and reinstall.