You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

68 lines
2.1 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

/**
* \file Menus.c
* \brief Fichier qui contient les fonctions du menu
* \author Antoine Perederii - Ayour Malki - Kyllian Chabanon
*/
#include "Fonctions.h"
/**
* \brief Affiche le menu principal et permet de choisir une option
* \author Antoine Perederii - Ayour Malki
* \return le choix entré par l'utilisateur
*/
int ChoixMenu(void)
{
int choix;
printf("\nMenu principal\n");
printf("1.\tAffichage\n");
printf("2.\tAjouter un adhérent\n");
printf("3.\tModifier l'âge d'un adhérent\n");
printf("4.\tSuppression d'un adhérent\n");
printf("5.\tAjout de points sur une carte\n");
printf("6.\tModification de l'état de la carte\n");
printf("7.\tCréditer une activité à une carte\n");
printf("8.\tQuitter\n");
printf("\nOption choisie : ");
scanf("%d", &choix);
return choix;
}
/**
* \brief Affiche le menu d'affichage et permet de choisir une option
* \author Ayour Malki - Antoine Perederii
* \return le choix entré par l'utilisateur
*/
int ChoixMenuAffichage(void)
{
char choix;
printf("\nMenu d'affichage\n");
printf("A.\tAffichage des informations d'un adhérent\n");
printf("B.\tAffichage des informations de tous les adhérents\n");
printf("C.\tAffichage du nombre dentrées totales de toutes les journées\n");
printf("D.\tAffichage du nombre d'entrées totales depuis le début\n");
printf("E.\tAffichage du nombre total d'adhérents\n");
printf("F.\tQuitter\n");
printf("\nOption choisie : ");
scanf("%*c%c", &choix);
return choix;
}
int choixMenuActivites(void)
{
int choix;
printf("\nChoix activités :\n");
printf("1.\tPiscine, \t\t\t0pt\n");
printf("2.\tOption accessibilité, \t\t0pt\n");
printf("3.\tAquakid + Aquaplouf, \t\t5pt\n");
printf("4.\tAquafit, \t\t\t9pt\n");
printf("5.\tCours de natation, \t\t10pt\n");
printf("6.\tCours de gymnastique aquatique, 12pt\n");
printf("7.\tVagues, \t\t\t15pt\n");
printf("8.\tAquabike, \t\t\t20pt\n");
printf("9.\tAquafamily, \t\t\t35pt\n");
printf("10.\tQuitter\n");
printf("\nOption choisie : ");
scanf("%d", &choix);
return choix;
}