From 582542e39f1930c854c73d53744a8d4e369a7cf9 Mon Sep 17 00:00:00 2001 From: gonzo Date: Fri, 19 May 2023 10:31:51 +0200 Subject: initial commit, contract struct + bullet loan --- contract.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 contract.h (limited to 'contract.h') diff --git a/contract.h b/contract.h new file mode 100644 index 0000000..4c74cb0 --- /dev/null +++ b/contract.h @@ -0,0 +1,12 @@ +#pragma once + +typedef struct contract { + unsigned int n; /* duration of the loan */ + unsigned int k; /* current year */ + unsigned int d; /* delay period of the loan */ + float r; /* interest rate */ + float P; /* part of the pricipal left at year k */ + float I; /* the interest for year k */ + float D; /* part of the capital reinbursed on year k */ + float A; /* annuity for year k */ +} contract; -- cgit v1.2.3