summaryrefslogtreecommitdiffstats
path: root/loans.h
diff options
context:
space:
mode:
Diffstat (limited to 'loans.h')
-rw-r--r--loans.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/loans.h b/loans.h
index aed283e..4e3a3df 100644
--- a/loans.h
+++ b/loans.h
@@ -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);