Advertisement
Guest User

Untitled

a guest
Dec 8th, 2016
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. //200675981 avi bechavod
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4. #define TRUE 1
  5. #define FALSE 0
  6. int main()
  7. {
  8.  
  9. int c_flag=TRUE;
  10. int count=0;
  11. char a;
  12. if(c_flag==FALSE){
  13. a=getchar();
  14. if(a == ' '){
  15. c_flag=TRUE;
  16. }
  17. }
  18. else if(c_flag==TRUE){
  19. while(a!=EOF){
  20. count++;
  21. a=getchar();
  22. printf("%c",a);
  23. if(a == ' '){
  24. count =0;
  25. printf("\n");
  26. }
  27. else if(count>4){
  28. count=0;
  29. printf("\n");
  30. c_flag=FALSE;
  31. }
  32. }
  33. }
  34.  
  35.  
  36. return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement