/* convert - takes a decimal number and converts it to many other formats
*/
int main(void)
{
char command[64];
printf("This is Conversion 0.0.4, written by LazyFIDERook.\n");
printf("This program takes a decimal number and converts it to other formats.\n \n");
fflush(stdout);
printf("Type a decimal number: ");
scanf("%u");
printf("This is the octal format: %o\n");
printf("This is the hexadecimal format: 0x%x\n");
printf("This is the ASCII character: %c\n \n");
printf("Type another number, or type 'quit' to exit: ");
scanf("%s", command);
if(!strcmp(command, "quit")) exit(1);
else
{
printf("This is the octal format: %o\n");
printf("This is the hexadecimal format: 0x%x\n");
printf("This is the ASCII character: %c\n \n");
}
return(0);
}