summaryrefslogtreecommitdiff
path: root/src/main.c
blob: e6328e0cfb1695ef3dcd882ad1867f0d1abf7a22 (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
28
#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: 
    print("Please input number\n");
    return 0;
}