|
@ -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;\ |
|
@ -159,4 +160,10 @@ long double getNumber(char *message, long double *min, long double *max, long do |
|
|
printf("\n"); |
|
|
printf("\n"); |
|
|
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); |
|
|
} |
|
|
} |