Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- int main()
- {
- char a[1000],temp;
- int n,i,j,k;
- while(scanf("%[^\n]",a)!=EOF){
- getchar();
- i=0;
- j=0;
- n=strlen(a);
- while(1){
- while(1){
- if(a[i]==' ' || a[i]=='\0')
- break;
- i++;
- }
- for(k=i-1;k>=j;k--)
- printf("%c",a[k]);
- if(i==n)
- break;
- printf(" ");
- i++;
- j=i;
- }
- printf("\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement