Signed-off-by: Mathéo Hersan <matheohersan@MacBook-Pro-de-Matheo.local>pull/2/head
parent
62203ccd46
commit
47527dcd56
@ -0,0 +1,4 @@
|
||||
32
|
||||
660
|
||||
5079
|
||||
8043
|
@ -1,23 +1,3 @@
|
||||
//
|
||||
// Created by Mathéo Hersan on 16/10/2023.
|
||||
//
|
||||
#include <stdio.h>
|
||||
|
||||
#include "client.h"
|
||||
|
||||
void chargerClient(int tNumClient[], float tCagnotte[], int tSus[], int *tLogique)
|
||||
{
|
||||
FILE *fic;
|
||||
int i;
|
||||
fic = fopen("donnee/client.txt", "r");
|
||||
if (fic == NULL)
|
||||
{
|
||||
perror("fopen");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
while (fscanf(fic, "%d %f %d", &tNumClient[*tLogique], &tCagnotte[*tLogique], &tSus[*tLogique]) != EOF)
|
||||
{
|
||||
(*tLogique)++;
|
||||
}
|
||||
fclose(fic);
|
||||
}
|
||||
//fonction ajouter un article au panier.
|
||||
|
@ -1,3 +1 @@
|
||||
|
||||
|
||||
int chargementArticles(int tRef[], float tPoids[], float tVol[], float tPrix[], float tPhysique);
|
@ -1,12 +1,3 @@
|
||||
#include <stdio.h>
|
||||
#include "responsable.h"
|
||||
#include "../interface/interface_resp.h"
|
||||
|
||||
int main (void)
|
||||
{
|
||||
int tPhysique = 10, tRef[10], tLogique = 0;
|
||||
float tPoids[10], tVol[10], tPrix[10];
|
||||
tLogique = chargementArticles( tRef, tPoids, tVol, tPrix, tPhysique);
|
||||
affichArticles( tRef, tPoids, tVol, tPrix, tLogique);
|
||||
return 0;
|
||||
}
|
Loading…
Reference in new issue