diff options
author | Skiz <skiznet@aol.com> | 2024-09-15 17:28:08 -0400 |
---|---|---|
committer | Skiz <skiznet@aol.com> | 2024-09-15 17:28:08 -0400 |
commit | 93799cb80df74bce1c1704cd80361d1ce11254e0 (patch) | |
tree | 756b72ae662c6578f3776fef489c12397b66eaf6 | |
parent | 7772bc1926acf3fe3a94241043ce95186a0140d5 (diff) |
Fixed two errors, fix error message later
-rw-r--r-- | src/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -14,15 +14,15 @@ int main(int argc, char* argv[]) { char* input = argv[1]; // Does tax math: float numInput = atof(input); - float tax = numInput * 0.06; - float total = numInput + percent; + float tax = numInput * percent; + float total = numInput + tax; total = round((total * 100)) / 100; // Prints total to terminal: print("$%.2f \n", total); exit: - print("No input given,\nplease input the price of your product.\n"); + //print("No input given,\nplease input the price of your product.\n"); return 0; } |