2022-09-06 19:18:34 +00:00
|
|
|
#include <stdlib.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <ctype.h>
|
|
|
|
|
|
|
|
#include "support.h"
|
|
|
|
|
|
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
|
|
{
|
2022-09-06 22:23:51 +00:00
|
|
|
int c;
|
|
|
|
c = 0;
|
2022-09-06 19:18:34 +00:00
|
|
|
|
2022-09-06 22:23:51 +00:00
|
|
|
for(;(c = getchar()) != EOF;)
|
2022-09-06 19:18:34 +00:00
|
|
|
{
|
2022-09-06 22:23:51 +00:00
|
|
|
if(isascii(c) && !(c == ' ' || c == '\n' || c == '\t'))
|
2022-09-06 19:18:34 +00:00
|
|
|
{
|
2022-09-06 22:23:51 +00:00
|
|
|
putc(c, stdout);
|
2022-09-06 19:18:34 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2022-09-06 22:23:51 +00:00
|
|
|
fprintf(stdout, "%.3o", c);
|
2022-09-06 19:18:34 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return(0);
|
|
|
|
}
|