hello guys if we have array like
int numbers [] = {3,4,8,9,6,3,2,58,6,3,2,5};
how can we fast do smth like 3*4*8*9*6*3*2*58*6*3*2*5
also numbers[0]*numbers[1]*numbers[2] etc
all must be in one loop
#include <iostream>
using namespace std;
int main(){
int prod=1;
int v[]={1,2,3,4,5};
for(auto x:v){
prod *=x;
}
cout<<prod;
return 0;
}