Advertisement
Ro_ro400_

Untitled

Jan 10th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.86 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int output_of_stump  (int Counter , int star)
  6. {
  7.     while ( Counter < star )
  8.     {
  9.         cout << " ";
  10.         Counter++;
  11.     }
  12.     cout << "*";
  13. }
  14.  
  15. int output_of_spaces(int  C,int & q)
  16. {
  17.     while (C<q)
  18.     {
  19.         cout << " ";
  20.         C++;
  21.     }
  22.     q=q-1;
  23. }
  24.  
  25. int output_of_star(int Counter , int & f )
  26. {
  27.     while ( Counter < f )
  28.     {
  29.         cout << "*";
  30.         Counter++;
  31.     }
  32.     f=f+2;
  33.     cout << endl;
  34. }
  35.  
  36.  
  37. int main()
  38. {
  39.     int q;
  40.     int Counter=1;
  41.     int star=0;
  42.     int Counter_1=1;
  43.     cout << "wwedi chislo:";
  44.     cin >> star;
  45.     q=star;
  46.     int f=2;
  47.     while (Counter_1<star)
  48.     {
  49.         output_of_spaces(Counter,q);
  50.         Counter=1;
  51.         output_of_star( Counter , f );
  52.         Counter_1++;
  53.         Counter=1;
  54.     }
  55.     output_of_stump  (Counter , star);
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement