#include<stdio.h> int main() {int n,i,a[10000],c[10000],j; scanf("%d",&n); if(n<=1000) { for(i=0;i<2n;i++) { scanf("%d",&a[i]); } for(j=0,i=0;i<2n,j<n;i=2*j+2,j++) { c[j]=(a[i]*a[i+1]); } for(i=0;i<n;i++) printf("%d\n",c[i]); return 0; } }
No need to start a new topic, replying the the previous one would have done.
Why do you think increasing the number of elements in a and c would fix the problem? What do you hold in these arrays?
Try this test case
1 123456789012345678901234567890 123456789012345678901234567890
Ya! you are right I did a wrong thing. Sooo… what should i do increase individual capacity of units in array to satisfy problem need
Use some structure capable of holding 10000 digits, such as a string, or byte array. You’ll then need to create a multiplication function to work with that structure.