#include <iostream> using namespace std; int main() { int n; int x = 1; int sum=0; cout << "Please enter the prodect of 8 " << endl; while (x<=8) { cout << "Please enter integers "; cin >> n; sum= sum * n; x = x + 1; } cout << "The sum of the prodect is = " << sum << endl; system("pause"); return 0; }
int sum=0; // <- this should be 1 not 0
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)