Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include<cstring>
- using namespace std;
- char s[256];
- int main()
- {
- cin.getline(s,256);
- char *p ,nou[256]={0};
- p=strtok(s," ");
- while(p)
- {
- strcat(nou,p);
- strcat(nou," " );
- p=strtok(NULL," ");
- }
- nou[strlen(nou)-1]=NULL;
- cout<<nou;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement