Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int r=1000;
- int a[r];
- int q=r;
- int x=0;
- int b;
- while (q>0){
- a[q]=1;
- q--;
- }
- while (a[q-1]!=0){
- cout << "vvedi kakoi-to chislo ";
- cin >> a[q];
- q++;
- }
- q=0;
- int e=0;
- while (q<r) {
- if (a[q]>e){
- e=a[q];
- }
- q++;
- }
- q=0;
- while (a[q]!=0 && q<r){
- b=0;
- x=q;
- while (a[x]<e) {
- cout << " ";
- a[x]=a[x]+2;
- b=b+2;
- }
- a[x]=a[x]-b;
- while (a[x]>0){
- cout << "*";
- a[x]=a[x]-1;
- }
- cout << endl;
- q++;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement