Open ANIL80531 opened 11 months ago
Your code will not work if there is tab between words. try this
#include<stdio.h> int main(){ int c=0; int state=0; while((c=getchar())!=EOF){ if((c==' '||c=='\t'||c=='\n')&&state==1){ putchar('\n'); state=0; } else{ putchar(c); state=1; } } }
@ANIL80531 can you please make a pull request related to this? I'm really sorry, it took me a long time to review the changes
Your code will not work if there is tab between words. try this