Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "pch.h"
- #include <iostream>
- int main()
- {
- int n, no_rows, no_columns;
- std::cout << "Please Enter the number of Blocks: ";
- std::cin >> n;
- no_columns = n;
- no_rows = n - 1;
- for (int i = 1; i <= no_rows; i++)
- {
- for (int j = 0; j < no_columns; j++)
- {
- std::cout << "*";
- }
- std::cout << "n";
- no_columns = no_columns - 2;
- for (int k = 0; k < i; k++)
- {
- std::cout << " ";
- }
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment