Can someone explain me the difference between
for(i=1;i<=n;i++)
{
x=a[0]*i+temp;
a[0]=x%10;
temp=x/10;
}
**AND**
for(i=1;i<=n;i++)
{
for(j=0;j<m;j++)
{
x=a[j]*i+temp;
a[j]=x%10;
temp=x/10;
}
}
Even though a[j]is always a[0] since value of j doesnt exceed 0 as m is always 1.Why do these codes work differently? Or did I understand something wrong.Any help is appreciated.