diff --git a/project.yml b/project.yml index e253248..a54e1f4 100644 --- a/project.yml +++ b/project.yml @@ -88,7 +88,7 @@ :placement: :end :flag: "-l${1}" :path_flag: "-L ${1}" - :system: [] # for example, you might list 'm' to grab the math library + :system: [m] # for example, you might list 'm' to grab the math library :test: [] :release: [] diff --git a/src/userinput.c b/src/userinput.c index ec1a8f1..9792e50 100644 --- a/src/userinput.c +++ b/src/userinput.c @@ -4,6 +4,7 @@ #include #include #include +#include void trimLeft(char *input) { size_t length = strlen(input); @@ -69,4 +70,13 @@ char *getstr(char *message, unsigned long *minLength, unsigned long *maxLength) result = readInput(); } return result; +} + +void printlf(long double value) { + if (roundl(value) == value) { + printf("%.0Lf", value); + } + else { + printf("%Lf", value); + } } \ No newline at end of file