Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (Elka while)
- #include <iostream>
- using namespace std;
- int main()
- { int a=0;
- int i=0;
- int j=0;
- int k = 0;
- cout<<"Privet vvedi visotu:";
- cin>>a;
- while(i<a){
- j = 0;
- while(j<a-i){
- cout<<' ';
- j++;
- }
- k = 0;
- while(k<2*i+1)
- {
- cout << "*";
- k++;
- }
- i++;
- cout << endl;
- }
- i = 0;
- while(i<a){cout<<' ';
- i++;}
- cout<<"*";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement