You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
386 B
C
29 lines
386 B
C
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <ctype.h>
|
|
|
|
#include "support.h"
|
|
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
int i, c;
|
|
FILE *fp;
|
|
i = c = 0;
|
|
|
|
for(;(c = getchar()) != EOF; i++)
|
|
{
|
|
if(isascii(c) && (c != ' ' && c != '\n' && c != '\t'))
|
|
{
|
|
printf("%c", c);
|
|
}
|
|
else
|
|
{
|
|
printf("%.3o", c);
|
|
}
|
|
}
|
|
|
|
return(0);
|
|
}
|