Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int side;
- cout << "Enter a number: ";
- cin >> side;
- int i = side;
- do
- {
- cout << endl;
- i--;
- }
- while (i > 0);
- {
- int j = 0;
- while (j < i - 1)
- {
- cout << " ";
- j++;
- }
- while (j < side)
- {
- cout << "#";
- j++;
- }
- cout << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement