WAP to multiply the values of two single dimensional arrays of size 5 each. Also display the result.
Khushi06:
i dont know the Ans so i am asking
Answers
Answered by
1
int main()
{
int c[5];
int a,b;
for(a=0; a<5; a++)
{
printf("\nEnter c[%d] : ",a);
scanf("%d",&c[a]);
}
b=1;
for(a=0; a<5; a++)
{
b=b*c[a];
}
printf("\nProduct is : %d\n",b);
return 1;
}
Hope this helps!
{
int c[5];
int a,b;
for(a=0; a<5; a++)
{
printf("\nEnter c[%d] : ",a);
scanf("%d",&c[a]);
}
b=1;
for(a=0; a<5; a++)
{
b=b*c[a];
}
printf("\nProduct is : %d\n",b);
return 1;
}
Hope this helps!
Similar questions