2024-12-16 14:34:53 +01:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
|
2025-09-30 09:43:41 +02:00
|
|
|
typedef struct {
|
|
|
|
char tab[50];
|
|
|
|
int indice_debut;
|
|
|
|
int indice_fin;
|
|
|
|
int taille;
|
|
|
|
} pile;
|
|
|
|
|
|
|
|
|
2024-12-18 10:13:34 +01:00
|
|
|
struct maillon_s {
|
|
|
|
char valeurs;
|
|
|
|
struct maillon_s* suivant;
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct maillon_s maillon;
|
|
|
|
|
|
|
|
void push(pile* p){
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2024-12-16 14:34:53 +01:00
|
|
|
int main(void){
|
2024-12-18 10:13:34 +01:00
|
|
|
char ordre[1][2];
|
|
|
|
printf("La pile attend vos ordres \n > ");
|
|
|
|
scanf("%c", &ordre);
|
|
|
|
|
|
|
|
while(ordre != "q"){
|
|
|
|
printf("La pile attend vos ordres \n > ");
|
|
|
|
scanf("%c", &ordre);
|
|
|
|
|
|
|
|
if (ordre == "q"){
|
|
|
|
printf("Au revoir\n");
|
|
|
|
return EXIT_SUCCESS;
|
|
|
|
}else if (ordre[0] == "+") {
|
|
|
|
push(ordre[1]);
|
|
|
|
} else if (ordre[0] == "-") {
|
|
|
|
printf("hello");
|
|
|
|
}
|
|
|
|
}
|
2024-12-16 14:34:53 +01:00
|
|
|
return EXIT_SUCCESS;
|
|
|
|
}
|