0
How pattern generate without using a for loop
in c++ or c
6 ответов
+ 3
So basically, use recursion
+ 2
using while loop or do while loop I guess ?
+ 1
ya but it's not easy compare to for other then
+ 1
for(int j = 0; j < 10; ++j)
cout<<j;
<=>
int j = 0;
while(j < 10)
cout << j++;
<=>
int j = 0;
do{
cout << j ++;
}while( j < 10);
0
use function
https://code.sololearn.com/cwm8EV4MF8zS/?ref=app