-
Notifications
You must be signed in to change notification settings - Fork 0
/
tp3.h
41 lines (32 loc) · 1 KB
/
tp3.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#ifndef TP3_H
#define TP3_H
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <time.h>
typedef struct Transaction{
int idEtu;
float montant;
char* descr;
struct Transaction* next;
}T_Transaction;
typedef struct Block{
int idBlock;
struct tm *date;
T_Transaction *liste;
struct Block *next;
}T_Block;
typedef T_Block* BlockChain;
T_Transaction *ajouterTransaction(int idEtu, float montant, char *descr, T_Transaction *listeTransaction);
BlockChain ajouterBlock(BlockChain bc);
BlockChain ajouterBlock2(BlockChain bc, struct tm*);
float totalTransactionEtudiantBlock(int idEtu, T_Block b);
float soldeEtudiant(int idEtu, BlockChain bc);
void crediter(int idEtu, float montant, char *descr, BlockChain bc);
int payer(int idEtu, float montant, char *descr, BlockChain bc);
int transfert(int idSource, int idDestination, float montant, char *descr, BlockChain bc);
void consulter(int idEtu, BlockChain bc);
void export(BlockChain bc);
void nettoyerFichier();
BlockChain import();
#endif // TP3_H