Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int a[5];
- int max=a[0];
- for ( int i = 0; i < 5; i++ )
- {
- cout << "Zirochok v "<< i+1 << "-omu stovptsi: ";
- cin >> a[i];
- }
- for (int i=0; i<5; i++)
- {
- if (a[i] > max)
- {
- max = a[i];
- }
- }
- for (int i=0; i<max; i++)
- {
- int c=max;
- int d;
- for (int j=0; j<5; j++)
- {
- if (a[j]>0)
- {
- cout << "*";
- c--;
- }
- else
- {
- cout << " ";
- }
- a[j]--;
- }
- cout<< endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement