36 printf(
"%s [%g]: ", prompt, def);
40 sscanf(s,
"%lf", &val);
58 printf(
"%s [%g]: ", prompt, def);
62 sscanf(s,
"%f", &val);
80 printf(
"%s [%ld]: ", prompt, def);
84 sscanf(s,
"%ld", &val);
102 printf(
"%s [%d]: ", prompt, def);
106 sscanf(s,
"%d", &val);
124 printf(
"%s [%d]: ", prompt, def);
128 sscanf(s,
"%hd", &val);
double query_double(char *prompt, double def)
Prompts the user for a double precision number.
float query_float(char *prompt, float def)
Prompts the user for a float precision number.
long query_long(char *prompt, long def)
Prompts the user for a long integer.
short query_short(char *prompt, short def)
Prompts the user for a short integer.
int query_int(char *prompt, int def)
Prompts the user for an integer.