#include <stdlib.h>
#include <stdio.h>
#include <assert.h>
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#include <string.h>

int main(int argc, char * argv[]){
  srand(time(NULL));
  printf("Bienvenue, ");
  int choix = 0;
  while (choix != 3){
    printf("faites votre choix :\n");
    printf("1 : Pile ou Face\n");
    printf("2 : Manger\n");
    printf("3 : Quitter\n");
    scanf("%d", &choix); // Lecture d'un nombre
    assert(1 <= choix && choix <= 3);
    if (choix == 1){
      if (rand() % 2 == 0)
        printf("Pile !\n");
      else
        printf("Face !\n");
    }
    if (choix == 2){
      printf("Miam !\n");
    }
  }

  return 0;
}
