ihello,
i am doing to print the no of multiplies using for loop but it print only last no i.e if i give no is 2 then after multiplication it prints 20.i want to print all multiplies.
the for loop code is
for (i=0;i<=n;i++)
int no;
no=n*ii;
}
for (i=0;i<=n;i++)
cout<<i<<':'<<no<<endl;
plz tell me

for (i=0;i<=n;i++)
int no;
no=n*ii;
}
for (i=0;i<=n;i++)
cout<<i<<':'<<no<<endl;

This is your existing code :

Try this one in the place of it

for (i=0;i<=n;i++)
{int no;
no=n*i;
cout<<i<<':'<<no<<endl;
}

Hope this works .