diff options
Diffstat (limited to 'loans.h')
| -rw-r--r-- | loans.h | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -1,12 +1,13 @@ #pragma once #include <stdlib.h> #include <math.h> +#include <string.h> #include "contract.h" typedef enum loan_type { - BULLET, - STRAIGHTLINE, - MORTGAGE, + BULLET = 0, + STRAIGHTLINE = 1, + MORTGAGE = 2, } loan_type; #pragma clang diagnostic push @@ -36,3 +37,6 @@ void mort_free(contract *); loan loan_init(loan_type type, int n, int d, double r, double P); double loan_update(loan); void loan_free(loan); + +/**** read loan type ****/ +loan_type read_loan_type(char **contract_subtypes, char *lt); |
