summaryrefslogtreecommitdiffstats
path: root/contract.h
diff options
context:
space:
mode:
Diffstat (limited to 'contract.h')
-rw-r--r--contract.h12
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;