Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

product of array in cpp

int a[5] = {2,3,4,5,6};
    int product = 1;
    for(int i=0;i<5;i++)
    {
        product *= a[i];
    }
    cout<<product;
 
PREVIOUS NEXT
Tagged: #product #array #cpp
ADD COMMENT
Topic
Name
8+4 =