please help me for loop c++ i don't to run it -
I can not write a code for loop c ++, I want it
1 21 321 4321
But I do not write this way.
#include & lt; Iostream & gt; using namespace std; Int main () {int num; CIN & gt; & Gt; Number; (Int i = 1; i & lt; = num; i ++) for {for (int j = 1; j & lt; = i; j ++) {cout & lt; & Lt; J; } Cout & lt; & Lt; Endl; } Cin.get (); }
It outputs:
1 12 123 1234 12345 123456 1234567 12345678 123456789
) And it will work. for
(int j = i; j> = 1; j-- div = "post-text" itemprop = "text ">
Comments
Post a Comment