Below is my code so far that ask user for how many numbers they want to input. This program can calculate average based on the numbers that the user input but I also need it to find the product or multiplication of all the numbers entered. I know how to do if I set the number size but since the user deteremines that I don't know how to do the multiplication.
#include<iostream>
using namespace std;
int p, N = 0.0, sum =0;
float average = 0.0;
int main(){
cout<<"Enter the number of integers you want to enter: ";
cin>>N;
for (int i=0; i<N; i++) {
cout<<"enter a number: ";
cin>>p;
sum += p;
}
cout<<"The sum is "<<sum<<"\nThe average is "<<sum/N<<"\n";
system("pause");
}