|
|
@ -27,6 +27,18 @@ void printText(char *text) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void printlf(long double value) { |
|
|
|
if (fakeInput != NULL) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if (roundl(value) == value) { |
|
|
|
printf("%.0Lf", value); |
|
|
|
} |
|
|
|
else { |
|
|
|
printf("%Lf", value); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
void trimLeft(char *input) { |
|
|
|
size_t length = strlen(input); |
|
|
|
int firstIndex = 0; |
|
|
@ -81,18 +93,6 @@ char *readInput() { |
|
|
|
return buffer; |
|
|
|
} |
|
|
|
|
|
|
|
void printlf(long double value) { |
|
|
|
if (fakeInput != NULL) { |
|
|
|
return; |
|
|
|
} |
|
|
|
if (roundl(value) == value) { |
|
|
|
printf("%.0Lf", value); |
|
|
|
} |
|
|
|
else { |
|
|
|
printf("%Lf", value); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
char *gets(char *message, unsigned long *minLength, unsigned long *maxLength) { |
|
|
|
printText(message); |
|
|
|
char *result = readInput(); |
|
|
|