Advertisement
mitmady

Untitled

Sep 25th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int T[1000], n, min, indexMin;
  8. cin >> n;
  9. for (int i = 0; i < n; i++)
  10. cin >> T[i];
  11. min = arr[0];
  12. indexMin = 0;
  13. for (int i = 1; i < n; i++)
  14. if (T[i] < min) {
  15. min = T[i];
  16. indexMin = i;}
  17. cout << indexMin;
  18.  
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement