I remember someone else had a homework problem that they wanted us to solve. In search to find something to do I decided to attempt it. I have worked about 90% of it and would like help finishing it. I would post it back into the original thread but I dont want to do his/her homework and figure that he does not read the forums and just simply wanted an answer.
The person's homework was to have an output read
1
22
333
4444
55555
4444
333
22
1
well check out my code then I will ask my question.
I have it down to output 1223334444555554444333221 and would like help on what conditional to have the newline come into play, I have tried different clauses but no luck. There has to be one person to steer me into the right place. ThanksCode:#include <stdlib.h> main() { int i,x,x1,d; for(i=0;i<=5;++i) { for(x=0;x<i;++x) { printf("%i",i); } } if(i=4) { for(;i>0;i--) { for(x=0;x<i;++x) { printf("%i",i); } } } return(0); }