- #1
ineedhelpnow
- 651
- 0
I have my final exam for C++ tomorrow. I was studying a previous exam and I came across a certain problem that I would like to know how to do.
Suppose that we want to print out the following on the screen, please complete the code segment below by filling in the blanks
1
1 3
1 3 5
...
...
1 3 5 7... 99
1 is n<=99
I don't know what 2,3,4 are. I think 2 is i<=99 but I'm not sure.
And 5 is cout<<endl;
Suppose that we want to print out the following on the screen, please complete the code segment below by filling in the blanks
1
1 3
1 3 5
...
...
1 3 5 7... 99
Code:
for(int n=1; ---1---;++n){
for(int i=1; ---2---; ---3---)
cout<<---4---;
---5---;
}
1 is n<=99
I don't know what 2,3,4 are. I think 2 is i<=99 but I'm not sure.
And 5 is cout<<endl;