I need help with the line that says:
cout << "Please Enter 10 numbers (positive or negative)" << endl;
I only want it to say this at the top and not with each number. Please help! any ideas? thanks
// proj4_1.cpp : Defines the entry point for the console application.
//
#include <iostream>
using namespace std;
int main()
{
int num, sum_num = 0, poscount = 0, negcount = 0;
for (int x = 0; x < 10; x++)
{
cout << "Please Enter 10 numbers (positive or negative)" << endl;
cout << " Number " << x+1 << " : ";
cin >> num;
sum_num += num;
if (num >= 0)
poscount +=num;
else
negcount +=num;
cout << "\n";
}
cout << "Sum of all positive = "<< poscount;
cout << "\n";
cout << "Sum of all negative = " << negcount;
cout << "\n";