All pastes #151381 Raw Edit

Stuff

public c v1 · immutable
#151381 ·published 2006-08-28 00:13 UTC
rendered paste body
/* convert - takes a decimal number and converts it to many other formats */#include <stdio.h>#include <stdlib.h>#include <string.h>int main(void){   char command[64];   printf("This is Conversion 0.0.6, written by LazyFIDERook.\n");   printf("This program takes a decimal number and converts it to other formats.\n \n");   while(1)     {        printf("Type a decimal number or \"quit\" to quit: ");        fflush(stdout);        scanf("%s", command);        if(!strcmp(command, "quit")) {           exit(1);        } else {           printf("This is the octal format: 0%o\n", atoi(command));           printf("This is the hexadecimal format: 0x%x\n", atoi(command));           printf("This is the ASCII character: %c\n \n", atoi(command));        }     }   return 0;}