////////////////////////////////////////////////////////////////////// // // tobase8.c - program that displays the number input from STDIN in // a base 8 representation to STDOUT. // // Written By: Matthew Haas // Compile: run 'Make' from the project's base directory // Execute: change into project 'bin/' or add project bin/ to // your PATH // // Sample run: // // lab46:~/src/pipemath-fall2014/bin$ ./nine | ./plus 4 | ./tobase8 // 15 // lab46:~/src/pipemath-fall2014/bin$ // #include #include int main(int argc, char **argv) { int value; fscanf (stdin, "%d", &value); fprintf(stdout, "%o\n", value); return(0); }