Advertisement
alex326

Untitled

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