|
@ -6,6 +6,7 @@ |
|
|
#include <string.h> |
|
|
#include <string.h> |
|
|
#include <math.h> |
|
|
#include <math.h> |
|
|
#include <stdbool.h> |
|
|
#include <stdbool.h> |
|
|
|
|
|
#include <limits.h> |
|
|
|
|
|
|
|
|
#define LD(name)\ |
|
|
#define LD(name)\ |
|
|
long double name##ldvalue;\ |
|
|
long double name##ldvalue;\ |
|
@ -160,3 +161,9 @@ long double getNumber(char *message, long double *min, long double *max, long do |
|
|
fflush(stdout); |
|
|
fflush(stdout); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
short gethd(char *message, short *min, short *max) { |
|
|
|
|
|
LD(min) |
|
|
|
|
|
LD(max) |
|
|
|
|
|
return getNumber(message, minld, maxld, NULL, NULL, SHRT_MIN, SHRT_MAX); |
|
|
|
|
|
} |