Advertisement
alex326

Untitled

Jan 22nd, 2018
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. problema 1411
  2.  
  3. #include <iostream>
  4. using namespace std;
  5. int main()
  6. {
  7. int a,b,c=0,x,y;
  8. while (a!=0 && b!=0){
  9. cin>>a>>b;
  10. while (a>9){
  11. a=a/10;
  12. }
  13. x=a;
  14. while (b>9){
  15. b=b/10;
  16. }
  17. y=b;
  18. if (y==x)
  19. c++;
  20. }
  21. cout<<c-1;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement