blob: afd81dec86e14cc3b157f438423c0dd76e0ff213 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "config.c"
// 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 + percent;
total = round((total * 100)) / 100;
// Prints total to terminal:
print("$%.2f \n", total);
exit:
return 0;
}
|