Guest User

Untitled

a guest
Oct 17th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main () {
  4. int a[5];
  5. int i, min, minI;
  6. printf ("Enter 5 numbers: \n");
  7.  
  8. for (i=0; i<5; i++)
  9. {
  10. scanf("%d", &a[i]);
  11. }
  12. min = a[0];
  13. for(i=1; i<5; i++)
  14. if(a[i]<min)
  15. {
  16. min=a[i];
  17. minI = i;
  18. }
  19.  
  20. printf("\n Min element = %d.", minI);
  21.  
  22. return 0;
  23. }
Add Comment
Please, Sign In to add comment