|
@ -4,6 +4,7 @@ |
|
|
#include <stdio.h> |
|
|
#include <stdio.h> |
|
|
#include <stdlib.h> |
|
|
#include <stdlib.h> |
|
|
#include <string.h> |
|
|
#include <string.h> |
|
|
|
|
|
#include <math.h> |
|
|
|
|
|
|
|
|
void trimLeft(char *input) { |
|
|
void trimLeft(char *input) { |
|
|
size_t length = strlen(input); |
|
|
size_t length = strlen(input); |
|
@ -69,4 +70,13 @@ char *getstr(char *message, unsigned long *minLength, unsigned long *maxLength) |
|
|
result = readInput(); |
|
|
result = readInput(); |
|
|
} |
|
|
} |
|
|
return result; |
|
|
return result; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void printlf(long double value) { |
|
|
|
|
|
if (roundl(value) == value) { |
|
|
|
|
|
printf("%.0Lf", value); |
|
|
|
|
|
} |
|
|
|
|
|
else { |
|
|
|
|
|
printf("%Lf", value); |
|
|
|
|
|
} |
|
|
} |
|
|
} |