0
How to write a program for 1 22 333 4444 55555 vertically downwards
1 22 333 4444 55555 like this
2 ответов
+ 9
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
for(int row=1; row<=_; row++){
for(int col=_; col<=___; col++){
cout << ___;
}
cout << ____;
}
return 0;
}
you have 5 missing parameters
fill 'em up ^_^
+ 6
Hint:
- Use a nested for loop, outer loop for rows (y), inner loop for columns (x).
- The inner loop (x) repetition count follows the outer loop iterator (y) value.
- Upon exiting the inner loop, print out a new line so next time inner loop executes, it draws on different line.
- I hope you understand the hint.
- Good luck : )