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