|
#include <iostream>
using namespace std;
int main()
{
double num_one, num_two, num_three, num_four, num_five, num_six, num_seven, num_eight, sum, product, average;
char ans;
cout << "Please enter eight numbers: "<< end;
cin >> num_one >> num_two >> num_three >> num_four>> num_five >> num_six >> num_seven >> num_eight;
cout << "The sum of the numbers is: " << endl;
sum =num_one + num_two + num_three + num_four + num_five+ num_six + num_seven + num_eight;
cout << sum << end1;
cout << "The product of the numbers is: " << endl;
product = num_one * num_two * num_three * num_four * num_five * num_six * num_seven * num_eight;
cout << product << endl;
cout << "The average of the numbers is: " << endl;
average = (num_one + num_two + num_three + num_four + num_five + num_six + num_seven + num_eight)/8;
cout << average << end1;
return 0
}
|
|
|
cout << average << end1;
Replace end1 to endl and also in the first line of cout you write just end so replace it with endl
|
|
|
cout << average << end1;
Replace end1 to endl and also in the first line of cout you write just end so replace it with endl
|
|
|
cout << average << end1;
Replace end1 to endl and also in the first line of cout you write just end so replace it with endl
|
|
|
cout << average << end1;
Replace end1 to endl and also in the first line of cout you write just end so replace it with endl
|
|
|
cout << average << end1;
Replace end1 to endl
|
|
|