update
This commit is contained in:
@@ -1,6 +1,34 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
struct maillon_s {
|
||||||
|
char valeurs;
|
||||||
|
struct maillon_s* suivant;
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef struct maillon_s maillon;
|
||||||
|
|
||||||
|
void push(pile* p){
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
int main(void){
|
int main(void){
|
||||||
|
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");
|
||||||
|
}
|
||||||
|
}
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
@@ -26,3 +26,7 @@ char dequeue(file* f){
|
|||||||
}
|
}
|
||||||
return m.valeur
|
return m.valeur
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int main(void){
|
||||||
|
return 0;
|
||||||
|
}
|
@@ -1,25 +0,0 @@
|
|||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
char tab[50];
|
|
||||||
int indice_debut;
|
|
||||||
int indice_fin;
|
|
||||||
int taille;
|
|
||||||
} car_file;
|
|
||||||
|
|
||||||
|
|
||||||
char dequeue(car_file* f){
|
|
||||||
f->indice_debut=(f->indice_debut+1)%50;
|
|
||||||
f-taille--;
|
|
||||||
return f->tab[(f->indice_debut+49)%50];
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
int main(void){
|
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
Reference in New Issue
Block a user