csansoon

P3.05 P32533 Control C202E

Oct 2nd, 2018
165
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5.     int n, i;
  6.     cin >> n;
  7.     for (int j=1; j<=n ; j++) {
  8.         for (int i=(n-j); i>0; i--) cout << "+";
  9.         cout << "/";
  10.         for (int i=(j-1); i>0; i--) cout << "*";
  11.         cout << endl;
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment