Advertisement
STANAANDREY

pb27

Nov 14th, 2018
201
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.26 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;// ||sau
  4.  
  5. int main() {
  6.    unsigned p=1;
  7.     unsigned n,cn,uc;
  8.     cout<<"n=";cin>>n;
  9.     cn=n;
  10.     n/=10;
  11.  
  12.     while (n!=0) {
  13.         p*=10;
  14.         n/=10;
  15.     }
  16.  
  17.     n=cn%p;
  18.     cout<<n/10;
  19. return 0;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement