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