0

How to do a nested loops in c++ using letters

11th Oct 2022, 12:23 PM
Bacani Rocelle M.
Bacani Rocelle M. - avatar
4 Answers
+ 2
Loops using letters? I'm not getting that idea. Please rephrase your question and add details in Descripton for better view of the problem.
11th Oct 2022, 2:03 PM
Ipang
+ 1
Let me see your code, I'll try to help you once I see what and where your problem is.
11th Oct 2022, 2:48 PM
Ipang
0
Doing nested loops in c++ and the output needed is letters not numbers like this L LO LOW LOWK LOWKE LOWKEY
11th Oct 2022, 2:06 PM
Bacani Rocelle M.
Bacani Rocelle M. - avatar
0
First of all, what is a loop? A loop is a construct that executes statements repeatedly until a specified condition is met. The statements are in the block of the loop. In C++, if there is only one statement to be repeated, then there will be no block (braces). There is the do-while loop, while-loop, and the for-loop. Such constructs are called compound statements. do-while loop A simple do-while loop is: int m = 0; do { cout << m << ' '; ++m; } while (m<5); There is an initial condition that is not really part of the loop. This initial condition is “int m = 0;”. The loop begins with the reserved word, do, and ends with a semicolon, after the while condition, “(m<5)”. The loop means to print out integers, beginning from zero until m is equal to 5. When m is equal to 5, no printing takes place. Regards, J wick
12th Oct 2022, 6:12 AM
Jimmy Wick
Jimmy Wick - avatar