fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {unsigned int a,k,x;
  5. a=0;k=0;
  6. do{cin>>x;
  7. while(x>99)
  8. x=x/10;
  9. if(x>9)
  10. {a=a*100+x;
  11. k=k+1;}
  12. }while(k!=4);
  13. cout<<a;
  14. return 0;
  15. }
Success #stdin #stdout 0s 3344KB
stdin
1234 3456 5678 7895
stdout
12345678