Write a program to multiply two arrays and store it in array c

//this is a program to multiply two arrays and store it in array c
#include<stdio.h>
#include<conio.h>
void main()
{
int i,a[4],b[4],c[4];

printf("\n\nEnter the Values of Arry A:- ");

for(i=0;i<4;i++)
{
printf("\n\nEnter Number: ");
scanf("%d",&a[i]);
}

printf("\n\nEnter the Values of Array B:- ");

for(i=0;i<4;i++)
{
printf("\n\nEnter Number: ");
scanf("%d",&b[i]);
}

printf("\n\nDisplayig the Values of Array C : \n\n");

for(i=0;i<4;i++)
{
c[i]=a[i]*b[i];
printf("\n\n %d ",c[i]);
}
getch();
}


Previous
Next Post »