From 15dd594e1af46e91f1fac27c5835d1cb4cf8153f Mon Sep 17 00:00:00 2001 From: Eric Bagus Date: Thu, 8 Feb 2024 20:59:53 +0100 Subject: [PATCH] Added operation handler float method and template output --- src/operationHandler.c | 8 ++++++++ src/operationHandler.h | 10 ++++++++++ 2 files changed, 18 insertions(+) diff --git a/src/operationHandler.c b/src/operationHandler.c index be3a094..122cb8b 100644 --- a/src/operationHandler.c +++ b/src/operationHandler.c @@ -107,4 +107,12 @@ void outputLong(long output) { void outputDouble(double output) { printf("Result: %lf", output); +} + +void outputFloat(float output) { + printf("Result: %f", output); +} + +void outputTemplate() { + printf("###############################\n-> Calculator\n#################################"); } \ No newline at end of file diff --git a/src/operationHandler.h b/src/operationHandler.h index 58ca89a..ad14eb2 100644 --- a/src/operationHandler.h +++ b/src/operationHandler.h @@ -10,4 +10,14 @@ bool containsTwoNumbers(const char*); int extractFirstNumber(char*); +void outputInteger(int); + +void outputDouble(double); + +void outputFloat(float); + +void outputLong(long); + +void outputTemplate(); + #endif //THEADMIRALS_OPERATIONHANDLER_H