/*
#include <iostream>
#include <iomanip>
using namespace std;
int main()
{
cout << " " << endl;
double sum;
double numb;
double ave;
int counter = 0;
cout << "This program averages numbers." << endl;
cout << endl;
while (true)
{
cout << "Number: ";
cin >> numb;
if( numb < 0 )
break;
else
{
sum += numb;
counter ++;
}
}
ave = sum / counter;
cout << fixed << "The average is " << ave << "." << endl;
}
My Problem: If I get an average of 5.40000 (example), my checking system (on my professor's pg) want's the output to be 5.4; but here's the kicker, if the average is something similar to 3.4523, it want's that value with removing the other decimals...so I can't use setprecision(x)...I've tried...
Any advice?