Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- switch (option)
- {
- case 10:
- {
- cout << "please enter " << SIZE3 << " numbers : ";
- int arr[SIZE3] = { 0 }, i = 0, j = 0, maxIndex = 0;
- for (i = 0; i < SIZE3; i++)
- cin >> arr[i];
- maxIndex = 0;
- for (i = 0; i < SIZE3; i++)
- {
- if (arr[i] > arr[maxIndex])
- maxIndex = i;
- }
- for (i = arr[maxIndex]; i > 0; i--)
- {
- for (j = 0; j < SIZE3; j++)
- {
- if (arr[j] >= i)
- {
- cout << "* ";
- }
- else
- {
- cout << " ";
- }
- }
- cout << endl;
- }
- cout << "------------\n";
- cout << arr[0] << " " << arr[1] << " " << arr[2] << " " << arr[3] << " " << endl;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment