Advertisement
Guest User

Untitled

a guest
May 9th, 2020
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <conio.h>
  3.  
  4. int main(int argc, char *argv[])
  5. {
  6. int n, min;
  7.  
  8. printf("Enter number..\n");
  9. scanf("%d", &n);
  10.  
  11. min = n % 10;
  12.  
  13. while(n /= 10)
  14. if(n % 10 < min)
  15. min = n % 10;
  16.  
  17. printf("\n%d\n", min);
  18.  
  19. getch();
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement