Advertisement
alex326

Untitled

Jan 21st, 2018
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. problema cifre2
  2.  
  3. #include <iostream>
  4. using namespace std;
  5. int main()
  6. { int n,r=0,s=0;
  7. cin>>n;
  8. while(n)
  9. { r=r*10+n%10;
  10. n/=10; }
  11. s=r%10+(r/10%10);
  12. cout<<s;
  13. return 0;}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement