Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- char r[105][20], s[105], sep[] = " ";
- void ScrisInvers(char s[])
- {
- int n = 0, i;
- char *p;
- p = strtok(s, sep);
- while(p != NULL)
- {
- strcpy(r[n], p); n++;
- p = strtok(NULL, sep);
- }
- for(i = n - 1; i >= 0; i--)
- {
- cout << r[i] << " ";
- }
- }
- int main()
- {
- cin.getline(s, 100);
- ScrisInvers(s);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement