Can you post your code? It will be easier to comment on that, rather than try to give hints while not giving too much away.
Can you post your code? It will be easier to comment on that, rather than try to give hints while not giving too much away.
Matticus
This program is for first column & i know it is incorrectCode:#include<stdio.h>int main(void) { int a,b,c,d,e,f,i; for(i=1; i<=64; i++) { for(a=0; a<=0; ++a) { printf("%d",a); } printf("\n"); } return 0; }
Last edited by Azeem; 08-24-2012 at 10:38 AM.
You've left out part of the description, the "nested for() loops" part. Matticus is using his knowledge of weird beginner assignments in assuming six nested loops (if that's what he's thinking of). I'm assuming that interpretation myself. In that case you need 6 index variables and each goes from 0 to 1.
The cost of software maintenance increases with the square of the programmer's creativity. - Robert D. Bliss
The outer for loop should go from 0 to 64 so:
The inner loop would print 'i' as binary. If you do not know how to do that, then create a separate program to experiment with that. In this case it does not matter if it's printed from left or right since you are not interested in the actual values.for(i = 0; i < 64; i++)
The output Should be like this:
The question is whether it can be solved "any way," for whether there is a specific implementation that is expected. oogabooga and I are assuming the latter (which would require six nested loops).I did, but it does not mention that it has to be 6 nested loops. It could also be solved with 2 nested loops.
@OP: There are actually a lot of hints in these posts that might give you a more clear idea of what we're talking about.