Advertisement
Guest User

ex12

a guest
Feb 19th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. //ex12culegere
  2. #include <iostream>
  3. #include <cstring>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. char a[256], *p, sep[]=" ";
  10. cin.get(a,255);
  11. cin.get();
  12. p=strtok(a,sep);
  13. while(p)
  14. {
  15. if(*p>='0' && *p<='9')
  16. cout<<p<<" ";
  17. p=strtok(NULL,sep);
  18. }
  19.  
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement