C言語なら俺に聞け! Part 76
■ このスレッドは過去ログ倉庫に格納されています
0136デフォルトの名無しさん
NGNG/*
intbase.c
Inputs and displays integer values in selected bases.
- input bases are decimal, octal, hexadecimal.
- display bases are decimal, octal, hexadecimal, and binary.
*/
#include <ctype.h>
#include <stdio.h>
#include <string.h>
/* no other #include statements are allowed */
#define MAXCHARS 34 /* maximum length of value string, in chars */
/* enumeration constants to identify menu choices */
enum choice { enter, decimal, octal, hex, binary, quit };
/* prototypes for required functions. don't use printf, scanf, or other similar */
enum choice menu(void);
int getInteger(void);
void putDecimal(int value);
void putOctal(int value);
void putHex(int value);
void putBinary(int value);
/* optional: any other function prototypes */
/* implement main, followed by the other functions */
■ このスレッドは過去ログ倉庫に格納されています