seberm

seberm

Jan 31st, 2010
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. /**
  2. * @author Otto Sabart <seberm[at]gmail[dot]com>
  3. * @file main.cpp
  4. */
  5.  
  6. #include <iostream>
  7. using namespace std;
  8.  
  9. int main(int argc, char *argv[]) {
  10.     int startProm = 5;
  11.  
  12.     for (int i = 0; i <= startProm; i++) {
  13.         for (int j = 0; j < i; j++)
  14.             cout << "1";
  15.  
  16.         for (int x = 0; x < startProm - i; x++)
  17.                 cout << "0";
  18.  
  19.         cout << "\n";
  20.     }
  21.  
  22.     return 0;
  23. }
  24.  
Add Comment
Please, Sign In to add comment