From b2ab7c3665c0a9eee6e8f208f1974253ce37eec9 Mon Sep 17 00:00:00 2001 From: gonzo Date: Sat, 10 Jun 2023 00:22:33 +0200 Subject: user may now select loan_type --- loans.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'loans.h') 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 #include +#include #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); -- cgit v1.2.3