Expand|Select|Wrap|Line Numbers
- 1 2 3 4 5
- 1 2 3 4
- 1 2 3
- 1 2
- 1
- 1 2
- 1 2 3
- 1 2 3 4
- 1 2 3 4 5
heres what I have :
Expand|Select|Wrap|Line Numbers
- #include <iostream>
- #include <iomanip>
- using namespace std;
- int main()
- { int row=5;
- int x=0;
- while (row > 0)
- {for(int a=1; a<=x; a++)
- {cout<<" ";
- }
- for (int b=1; b<=row; b++)
- {cout << b;
- }
- x++;
- row = row - 1;
- cout << endl;
- }
- system("pause"); //end while
- return 0;
- }