Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //ex12culegere
- #include <iostream>
- #include <cstring>
- using namespace std;
- int main()
- {
- char a[256], *p, sep[]=" ";
- cin.get(a,255);
- cin.get();
- p=strtok(a,sep);
- while(p)
- {
- if(*p>='0' && *p<='9')
- cout<<p<<" ";
- p=strtok(NULL,sep);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement