right now im working on a program that reads a series of numbers (doubles) from the user, then prints the mean and the
range.
also:
• I do not know ahead of time how many numbers will be in the list.
• When ctrl-z if pressed, stop asking for user input
• The numbers will be in the range of 0.0 to 100.0. Ignore numbers outside of this range.

I've tried to think of a way to get the mean and range but it ends up not making sense, and i know the ctrl-z thing has to do with it being 'false' or something? any help is greatly appreciated

#include <iostream>
#include <string>

using namespace std;

int main()
{
	double input, answer;
	double total = 0;
	while (cin >> input)
	{
		if ((input > 0) && (input < 100));
			
		
		else
		{cout << "out of range; ignored." << endl;}

	}
		
		
}

An error..
You had a semi-colon on the if()

int main()
{
   double input, answer;
   double total = 0;
   unsigned int count = 0;

   while (cin >> input)
   {
      if ((0.0 <= input) && (input <= 100.0))
      {
// Track number of entries, and sum the running tally.
// If you need to track all of them then you'll need some kind of dynamic array!

      }
      else
      {
           cout << "out of range; ignored." << endl;}
      }
   }   // MISSING while terminator		
		

       // Calculate AVERAGE and sum!
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.