djelad1

Untitled

Nov 22nd, 2014
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. cout << "please enter " << SIZE3 << " numbers : ";
  2. int arr[SIZE3] = { 0 }, i = 0, j = 0, maxIndex = 0, p = 0;
  3. for (i = 0; i < SIZE3; i++)
  4. cin >> arr[i];
  5. maxIndex = 0;
  6. for (i = 0; i < SIZE3; i++)
  7. {
  8. if (arr[i] > arr[maxIndex])
  9. maxIndex = i;
  10. }
  11.  
  12. for (i = 0; i < arr[maxIndex]; i++)
  13. {
  14. for (i = 0; i < SIZE3; i++)
  15. {
  16. if (arr[i] >= arr[maxIndex])
  17. cout << "* ";
  18. else
  19. cout << " ";
  20. }
  21. }
  22. cout << "\n";
Advertisement
Add Comment
Please, Sign In to add comment