Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int i, j, k, n;
- cin >> n;
- for (i = 1; i <= n; i++) {
- for (j = i; j <= n - 1; j++) { cout << " "; }
- for (j = i; j >= 1; j--) { cout << j << " "; }
- for (j = 2; j <= i; j++) { cout << j << " "; }
- cout << endl;
- }
- system("pause");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement