Skip to main content
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

C, 64 bytes

f(s,m,k){for(m=k=sqrt(strlen(s));k--;s+=m)printf("%.*s\n",m,s);}

Inspired by the other C answerthe other C answer. Only works on platforms where int has the same size as char* (e.g. 32-bit Windows).

C, 64 bytes

f(s,m,k){for(m=k=sqrt(strlen(s));k--;s+=m)printf("%.*s\n",m,s);}

Inspired by the other C answer. Only works on platforms where int has the same size as char* (e.g. 32-bit Windows).

C, 64 bytes

f(s,m,k){for(m=k=sqrt(strlen(s));k--;s+=m)printf("%.*s\n",m,s);}

Inspired by the other C answer. Only works on platforms where int has the same size as char* (e.g. 32-bit Windows).

Source Link
anatolyg
  • 13.9k
  • 2
  • 39
  • 110

C, 64 bytes

f(s,m,k){for(m=k=sqrt(strlen(s));k--;s+=m)printf("%.*s\n",m,s);}

Inspired by the other C answer. Only works on platforms where int has the same size as char* (e.g. 32-bit Windows).