* 2 small utilities i wrote
@ Tyler Spivey
` Dave Hunt
0 siblings, 1 reply; 3+ messages in thread
From: Tyler Spivey @ UTC (permalink / raw)
To: speakup
code's at the bottom.
not too well written, but they do what they are supposed to do , in my tests.
-- ac2t.c --
/*
program name: ac2t
this program takes input from stdin and outputs to stdout.
summary: converts input of the form:
ascii-code
ascii-code
..
to the result of those codes.
-1 == eof.
*/
#include <stdio.h>
int main() {
int ch;
while (!feof(stdin)) {
scanf("%d\n",&ch);
printf("%c",ch);
}
}
-- t2ac.c --
/*
program name: t2ac
this program takes input from stdin and outputs to stdout.
summary: converts text to ascii codes, 1 per line. example:
32
65
72
..
-1 (end)
*/
#include <stdio.h>
main() {
int ch;
while (!feof(stdin)) {
ch = getc(stdin); /* get from stdin */
/* print the ascii code, one per line. */
printf("%d\n",ch);
} /* while */
} /* main */
--
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~ UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2 small utilities i wrote Tyler Spivey
` Dave Hunt
` bz2 files randy turner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).