Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int zvezd[5];
- for (int i=0;i<5;i++)
- {
- cout << "Vvedite kol-vo zvezdochok dlya " << i+1;
- cout << " stolbec: ";
- cin >> zvezd[i];
- cout << endl;
- }
- while ((zvezd[0]!=0)||(zvezd[1]!=0)||(zvezd[2]!=0)||(zvezd[3]!=0)||(zvezd[4]!=0))
- {
- for (int i=0;i<5;i++)
- {
- if (zvezd[i]==0)
- cout<<" ";
- if (zvezd[i]!=0)
- {
- cout<<"*";
- zvezd[i]=zvezd[i]-1;
- }
- }
- cout<<endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement