Author: Anonymous Language: cpp
Description: No description Timestamp: 2007-10-17 15:10:09 -0400
View raw paste Reply
  1. void main() {
  2.         int n, i, j;
  3.  
  4.         cout << "Enter an integer." << endl;
  5.         cin >> n;
  6.  
  7.         for (i = 0; i < n; i++) {
  8.                 if ((i % 2) == 0){
  9.                         cout << " ";
  10.                 }
  11.                
  12.                 for (j = 0; j < n; j++) {
  13.                         cout << "*";
  14.                 }
  15.                 cout << endl;
  16.         }
  17. }
View raw paste Reply