Wednesday, 1 March 2017

C++ program of multiplication of array

In this program we will learn how to enter data in array and multiply the index of array.
The code is given below:

//Code starts

#include <iostream>
#include <conio.h>

using namespace std;

int main()
{
int a;
int array[a];
int multi;

multi=1;
cout<<"enter size of array"<<endl;
cin>>a;

for(int i=1;i<=a;i++)
{
cout<<"enter number for multi"<<endl;
cin>>array[i];
multi=multi*array[i];
    }
cout<<"multi is ="<<multi<<endl;
   
 getch();

}
//Code ends

OUTPUT:





Share:

0 comments:

Post a Comment