daily pastebin goal
23%
SHARE
TWEET

Untitled

a guest Dec 16th, 2018 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "pch.h"
  2. #include <iostream>
  3.  
  4. int main()
  5. {
  6. int n, no_rows, no_columns;
  7.  
  8. std::cout << "Please Enter the number of Blocks: ";
  9. std::cin >> n;
  10.  
  11.  
  12. no_columns = n;
  13. no_rows = n - 1;
  14.  
  15.  
  16. for (int i = 1; i <= no_rows; i++)
  17. {
  18.     for (int j = 0; j < no_columns; j++)
  19.     {
  20.         std::cout << "*";
  21.     }
  22.     std::cout << "n";
  23.     no_columns = no_columns - 2;
  24.  
  25.     for (int k = 0; k < i; k++)
  26.     {
  27.         std::cout << " ";
  28.     }
  29. }
  30. return 0;
  31. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top