Advertisement
SergeyPGUTI

4.2.2

Sep 29th, 2015
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.23 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7.     int n,Min=0;
  8.     cin>>n;
  9.     Min=n%10;
  10.     while(n!=0)
  11.     {
  12.         if (Min>(n%10))
  13.             Min=n%10;
  14.         n/=10;
  15.     }
  16.     cout<<Min;
  17.  return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement