- #1
ineedhelpnow
- 651
- 0
Print numbers 0, 1, 2, ..., userNum as shown, with each number indented by that number of spaces. For each printed line, print the leading spaces, then the number, and then a newline. Hint: Use i and j as loop variables (initialize i and j explicitly). Note: Avoid any other spaces like spaces after the printed number. Ex: userNum = 3 prints:
0
Sample program:
someone help me! i don't know how to do this!
the indents at the top arent supposed to be that big. just one extra space for each but i had to use the indent thing so it made a HUGE space.
0
1
2
3
Sample program:
Code:
#include <iostream>
using namespace std;
int main() {
int userNum = 0;
int i = 0;
int j = 0;
<STUDENT CODE>
return 0;
}
someone help me! i don't know how to do this!
the indents at the top arent supposed to be that big. just one extra space for each but i had to use the indent thing so it made a HUGE space.