summaryrefslogtreecommitdiffstats
path: root/loans.h
diff options
context:
space:
mode:
authorgonzo <gonzo@toniatuh.com>2023-06-10 00:22:33 +0200
committergonzo <gonzo@toniatuh.com>2023-06-10 00:22:33 +0200
commitb2ab7c3665c0a9eee6e8f208f1974253ce37eec9 (patch)
treec2c62aa5577ddd610e2c61eb265f08cf6622e18d /loans.h
parentf643587923125479281e4ba23d9bef01190b1bb3 (diff)
downloadloan_calc-b2ab7c3665c0a9eee6e8f208f1974253ce37eec9.tar.gz
user may now select loan_type
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);