NAME
getdouble, getfloat - ask user to type floating-point value

SYNOPSIS
#include <ctype.h>
#include <math.h>
#include <stdio.h>

double getdouble (prompt,min,max,defalt);
const char *prompt;
double min,max,defalt;

float getfloat (prompt,min,max,defalt);
const char *prompt;
float min,max,defalt;

DESCRIPTION
Getdouble and getfloat ask the user to type a floating-point
number. They begin by printing the string prompt as a message to
the user. The user then types in a floating-point number which is
parsed. If the number is valid and is within the range min to max,
inclusive, then the value is returned as the value of getdouble or
getfloat. If the value is invalid or out of range, then an error
message is printed and the cycle is repeated. If the user types
just a carriage return, then the value defalt is returned.

Getdouble and getfloat are identical, except for the type of the
parameters and the results.

SEE ALSO
getint(3), getbool(3), etc.
doublearg(3), floatarg(3)