Advertisement
Lucky134Lucky

Func. Yoll

Feb 29th, 2016
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.52 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int vvod();
  6. void vivod(int );
  7.  
  8. int main()
  9. {
  10.    vivod(vvod());
  11.  
  12. }
  13.  
  14.  
  15. int vvod() {
  16.  
  17.     int z;
  18.     cin >> z;
  19.     return z;
  20. }
  21. void vivod( int z ){
  22.  
  23.     for (int d = 0; d < z; d++){
  24.  
  25.         for(int k = d; k+1 < z; k++) {
  26.  
  27.             cout << " ";
  28.         }
  29.  
  30.         for( int f = 0; f < d+d+1; f++){
  31.  
  32.             cout << "*";
  33.         }
  34.  
  35.          cout << endl;
  36.     }
  37.     for(int a = 1; a < z; a++) {
  38.  
  39.         cout << " ";
  40.     }
  41.     cout << "*";
  42.  
  43. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement