Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main()
- {
- int d[5];
- int a,b,c,e,z;
- a=b=e=z=0;
- c=5;
- while (a<c)
- {
- cout << "zvezdochek v stolbike: ";
- cin >> d[b];
- a=a+1;
- b=b+1;
- }
- a=b;
- b=0;
- int max=d[b];
- b=b+1;
- while (b<a)
- {
- if (d[b]>max)
- {
- max=d[b];
- }
- b=b+1;
- }
- a=b=0;
- while (a<max)
- {
- while (e<c)
- {
- if (z<d[b])
- {
- cout << "*";
- }
- else
- {
- cout << " ";
- }
- b=b+1;
- e=e+1;
- }
- z=z+1;
- cout << endl;
- b=e=0;
- a=a+1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment