Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int output_of_stump (int Counter , int star)
- {
- while ( Counter < star )
- {
- cout << " ";
- Counter++;
- }
- cout << "*";
- }
- int output_of_spaces(int C,int & q)
- {
- while (C<q)
- {
- cout << " ";
- C++;
- }
- q=q-1;
- }
- int output_of_star(int Counter , int & f )
- {
- while ( Counter < f )
- {
- cout << "*";
- Counter++;
- }
- f=f+2;
- cout << endl;
- }
- int main()
- {
- int q;
- int Counter=1;
- int star=0;
- int Counter_1=1;
- cout << "wwedi chislo:";
- cin >> star;
- q=star;
- int f=2;
- while (Counter_1<star)
- {
- output_of_spaces(Counter,q);
- Counter=1;
- output_of_star( Counter , f );
- Counter_1++;
- Counter=1;
- }
- output_of_stump (Counter , star);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement