Ask your own question, for FREE!
Engineering 10 Online
OpenStudy (anonymous):

Using the nested for loop, write a snippet code to display the following output. Output: H?H?H?H?H? A*A*A*A* H?H?H? A*A* H?

OpenStudy (4n1m0s1ty):

for(int i = 0; i < 1 ; i++) { for (int ia = 0; ia<2; ia++) { for(int ib = 0; ib<3; ib++) { for(int ic = 0; ic<4; ic++) { for(int id=0; id<5; id++) { print H? endline } print A* endline } print H? endline } print A* endline } print H? }

OpenStudy (4n1m0s1ty):

actually I misplaced the endlines, but you get the general idea

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!