How to printf results from a loop?
For example if i have this something simple like this:
k[0]=2;
k[1]=3;
k[2]=4;
for (i = 0 ; i <= 2 ; i++)
{
x[i]=5*k[i];
}
How do I print out the results for x[0],x[1],x[2] without having to keep repeating the array in printf? As in
printf("%d %d %d\n",x[0],x[1],x[2]);
I dont really want to do the printf above because for my problem i actally have an array of 100 values, i cant be repeating the x[0],x[1]... for one hundred times.
Hope someone can help out thanks loads!