diff options
| author | gonzo <gonzo@toniatuh.com> | 2023-05-19 10:31:51 +0200 |
|---|---|---|
| committer | gonzo <gonzo@toniatuh.com> | 2023-05-19 10:31:51 +0200 |
| commit | 582542e39f1930c854c73d53744a8d4e369a7cf9 (patch) | |
| tree | fd784c0b88d457605e536097c30c3fbbf0f3758f /contract.h | |
| download | loan_calc-582542e39f1930c854c73d53744a8d4e369a7cf9.tar.gz | |
initial commit, contract struct + bullet loan
Diffstat (limited to 'contract.h')
| -rw-r--r-- | contract.h | 12 |
1 files changed, 12 insertions, 0 deletions
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; |
