#include <stdio.h>
#include <stdlib.h>
#include "mainWork.c"


int main()
{
    int resulScan, choix ;

    do
    {
        system("CLS") ;
        printf("\n          _|~ MENU TP2 ~|_\n\n\n  1. Partie 1\n  2. Partie 2\n  3. Programme principal\n  0. Quitter\n") ;
        resulScan = scanf ("%d", &choix) ;
        fflush (stdin) ;
        while ( (resulScan != 1) || (choix < 0) || (choix > 3) )
        {
            printf ("\nERREUR : Entree incorrecte !\n") ;
            resulScan = scanf ("%d", &choix) ;
            fflush (stdin) ;
        }

        switch (choix)
        {
            case 1 :
                part1() ;
                break ;
            case 2 :
                part2() ;
                break ;
            case 3 :
                mainPart() ;
            default :
                break ;
        }
    } while (choix != 0) ;

    return 0 ;
}
