Elite Diviner
- Joined
- Oct 10, 2005
- Messages
- 453
- Reaction score
- 0
#include <iostream>
#include <iomanip>
using namespace std;
int main () {
int x, z;
for ( int y = 0; y < 1; y++ )
{
for ( int x = 0; x < 9; x++ )
{
z=x+1;
cout << setfill ('#') <<setw (z)<<" "<<"0"<< endl;
**
**
**
Output is
0
# 0
## 0
### 0
#### 0
##### 0
###### 0
####### 0
######## 0
Press any key to continue
The out put i want is.
0
# 0
# # 0
# # # 0
# # # # 0
# # # # # 0
# # # # # # 0
How do u put Spaces between # >.< it has to be nested For loop too... i can do vertical spacing but not spaces between #.... forgot how and been trying to find out how anyone can explain i think its simple just i cant lol.. i know this code is noobish... just trying to get an example to work while i study for some cheap test. Teacher is horrible.......... we have not had lab for like 2 months and she expects us to know how to do guis and stuff already.
#include <iomanip>
using namespace std;
int main () {
int x, z;
for ( int y = 0; y < 1; y++ )
{
for ( int x = 0; x < 9; x++ )
{
z=x+1;
cout << setfill ('#') <<setw (z)<<" "<<"0"<< endl;
**
**
**
Output is
0
# 0
## 0
### 0
#### 0
##### 0
###### 0
####### 0
######## 0
Press any key to continue
The out put i want is.
0
# 0
# # 0
# # # 0
# # # # 0
# # # # # 0
# # # # # # 0
How do u put Spaces between # >.< it has to be nested For loop too... i can do vertical spacing but not spaces between #.... forgot how and been trying to find out how anyone can explain i think its simple just i cant lol.. i know this code is noobish... just trying to get an example to work while i study for some cheap test. Teacher is horrible.......... we have not had lab for like 2 months and she expects us to know how to do guis and stuff already.

