Talk:C

From Rabid Reaction Force
Revision as of 15:20, 10 September 2022 by 86.16.207.34 (talk) (more)

#include <stddef.h> #include <ctype.h> #include <stdlib.h> #include <stdio.h> #define K62 62 #define K77 77 #define K3 4 #define K3_ (K3-1) extern int main(int ac, const char *const *av) { static char b[K62][K77][K3]; char a[666]; int ln= 0; for (; fgets(a, stdin); ) { size_t y, z= strlen(a); char *s= a+z; for (; z && (--z, iscntrl(*--s)); *s= 0); y= z? (z-1)/K77+1: 1; z= z>=K3_? K3_ : z; /* !needed? */ for (++y; --y; ++ln, z= 0) { int lo= ln%K62, hi= ln/62; sprintf(b[lo][hi], "%-" K3 ".*s", z, a); } } for (ln= 0-1; ++ln<K62; ) puts(*b[ln]); }