Replies
Welcome, guest
Join CrazyEngineers to reply, ask questions, and participate in conversations.
CrazyEngineers powered by Jatra Community Platform
-
@thebigk • Jan 10, 2013
Umm, did you attempt the problem on your own? How about sharing what you've tried so far so that CEans here can help you correct it? -
@jeffrey-xA7lUP • Jan 14, 2013
Here is a logic in even digits of control variable print 0 and in odd value of control variable print 1
PS: Initialise control variable to 0 -
@rahul69-97fAOs • Jan 14, 2013
Here is another logic: keep concatenating a string with '0' and '1' alternatively and keep on printing the reverse of string 😎 .
PS: Initialize string to '1'. -
@nikhil-lokhande-EXmWKM • Jan 14, 2013
-
@anoop-kumar-GDGRCn • Jan 14, 2013
here is Algo
Outer_loop (int i=1; i<NUMBER_OF_LINES ; i++)
Inner_loop (j=i; j>0 ; j--)print (j%2);end Inner_loopprint (New_line);end Outer_loop;
-
@rahul69-97fAOs • Jan 14, 2013
Nice logic ! but I think it should be i< = NUMBER_OF_LINES instead of i<NUMBER_OF_LINESianoophere is Algo
Outer_loop (int i=1; i<NUMBER_OF_LINES ; i++)
Inner_loop (j=i; j>0 ; j--)print (j%2);end Inner_loopprint (New_line);end Outer_loop;
-
@anoop-kumar-GDGRCn • Jan 14, 2013
Yes.👍rahul69Nice logic ! but I think it should be i< = NUMBER_OF_LINES instead of i<NUMBER_OF_LINES