Files
Cody Boone Ferguson aa1427f18e Minor fixes in 1998/dlowe
The program (both main and alt versions) had main()'s return type as
void. To make it more portable, like another entry (that I was asked to
make this same change), I changed it to int.
2023-11-13 08:13:59 -08:00

19 lines
979 B
C

#include <stdio.h>
#define PO(o,t)\
(((o>64)&&(o<91))?(((t>96)&&(t<123))?(t-32):(t)):(((t>64)&&(t<91))?(t+32):(t)))
int main() { char *poo="poot",
*Poo="pootpoot" ,O[9],o;int t, T;(t=0)|| (*O='\0');while(
(o= getc( stdin ))!=( EOF))if (((o> 64)&&
(o< 91)) ||(( o>96 )&&(o <123 ))) (
t!=8 )&&(O [t]= o)&& (O[++ t] = '\0')
;else {if (t>7) {for (T = 0 ; T <=7; T++ )
printf("%c", PO(*( O+T), *(Poo+ T))); printf
("%c", o);}else if (t>3){for (T =0;T<=
3;T++) printf
("%c", PO(*(O
+T),*( poo+T)
) ); printf( "%c", o ) ; } else printf("%s%c", O, o); ( t =0) || (*O='\0'); } return 0;}