From ef2e056301767585b13804fadd2bbfa420743284 Mon Sep 17 00:00:00 2001 From: Skiz Date: Sun, 15 Sep 2024 17:05:44 -0400 Subject: Copied main source over. --- src/main.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 src/main.c (limited to 'src') diff --git a/src/main.c b/src/main.c new file mode 100644 index 0000000..04d4b09 --- /dev/null +++ b/src/main.c @@ -0,0 +1,26 @@ +#include +#include +#include +// Definitions: +#define lessthan < +#define print printf + +int main(int argc, char* argv[]) { + + if(argc lessthan 2) goto exit; + + // Get user's input: + char* input = argv[1]; + // Does tax math: + float numInput = atof(input); + float tax = numInput * 0.06; + float total = numInput + tax; + total = round((total * 100)) / 100; + + // Prints total to terminal: + print("$%.2f \n", total); + +exit: + return 0; +} + -- cgit v1.2.3