fork download
  1. #include<stdio.h>
  2. #include<string.h>
  3. //using namespace std;
  4.  
  5. int main()
  6. {
  7.  
  8. char a[10*100];
  9. while(gets(a)){
  10.  
  11. int b = -1, len = strlen(a);
  12.  
  13. for(int i = 0; i < len; i++){
  14. if(a[i] == ' '){
  15.  
  16. for(int j = i - 1; j > b; j--){
  17. printf("%c", a[j]);
  18. }
  19. printf(" ");
  20. b = i;
  21. }
  22. }
  23. for(int i = len - 1; i > b; i--){
  24. printf("%c", a[i]);
  25. }
  26. printf("\n");
  27. }
  28. }
  29.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
i lone you.
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:9:21: error: ‘gets’ was not declared in this scope
         while(gets(a)){
                     ^
stdout
Standard output is empty