summaryrefslogtreecommitdiffstats
path: root/contract.h
blob: bcaef151fbafdb08818445c82c505f3110e01343 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#pragma once

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wpadded"
typedef struct contract {
	unsigned int n; /* duration of the loan */
	unsigned int k; /* current year */
	unsigned int d; /* delay period of the loan */
	double r; /* interest rate */
	double P; /* part of the pricipal left at year k */
	double I; /* the interest for year k */
	double D; /* part of the capital reinbursed on year k */
	double A; /* annuity for year k */
} contract;
#pragma clang diagnostic pop