Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int oglindit=0;
- int primaCifra(int x)
- {
- if(x==0)
- return oglindit;
- else
- {
- oglindit=oglindit*10+x%10;
- primaCifra(x/10);
- }
- }
- int main()
- {
- int x;
- cin>>x;
- int nr=primaCifra(x);
- cout<<nr%10;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement