SHARE
TWEET

Assignment #2 (1/2) - Page 252 #10

adambkehl Feb 22nd, 2019 (edited) 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int rows = 0, count = 0;
  6.     cout << "Enter number of rows: ";
  7.     cin >> rows;
  8.     count = rows;
  9.  
  10.     for (int i = 0; i < rows; i++) {
  11.         count--;
  12.         for (int j = count; j > 0; j--) cout << ".";
  13.         for (int k = rows - count; k > 0; k--) cout << "#";
  14.         cout << endl;
  15.     }
  16.  
  17.     cin.get(), cin.get();
  18. }
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