summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSkiz <skiznet@aol.com>2024-09-15 17:28:08 -0400
committerSkiz <skiznet@aol.com>2024-09-15 17:28:08 -0400
commit93799cb80df74bce1c1704cd80361d1ce11254e0 (patch)
tree756b72ae662c6578f3776fef489c12397b66eaf6
parent7772bc1926acf3fe3a94241043ce95186a0140d5 (diff)
Fixed two errors, fix error message later
-rw-r--r--src/main.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 4285b1c..2a2317d 100644
--- a/src/main.c
+++ b/src/main.c
@@ -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;
}