Advertisement
fahim-ahmed2019

minimum number between users input numbers by using loop

Oct 19th, 2019
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4. int n,v,i;
  5. int minimum=1000000;
  6. printf("how many numbers you wish to compare?\n");
  7. scanf("%d",&n);
  8. printf("write %d numbers=\n",n);
  9. for(i=1;i<=n;i++)
  10. {
  11. scanf("%d",&v);
  12. if(v<minimum)
  13. minimum=v;
  14. }
  15. printf("the minimum numbers between this %d numbers is =%d\n",n,v);
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement