Я действительно не могу найти ошибку
#include <stdio.h> #include <stdlib.h> int main() { int choix,choix1,choix2; printf("\n"); printf("\n"); printf("||*****************************************************************************||\n"); printf("||*****************************************************************************||\n"); printf("||*************BIENVENUE DANS LE MENU PRINCIPAL DE LA BIBLIOTHEQUE*************||\n"); printf("||*****************************************************************************||\n"); printf("||*****************************************************************************||\n"); printf("||********************* VEUILLEZ CHOISIR ***********************||\n"); printf("||*****************************************************************************||\n"); printf("||*****************************************************************************||\n"); printf(" 1. GESTION DES PRETS POUR UN ADHERENT \n"); printf(" 2. GESTION ET EVALUATION DE LA BIBLIOTHEQUE \n"); printf("||*****************************************************************************||\n"); printf("||*****************************************************************************||\n"); printf(" 3. QUITTER L'APPLICATION \n"); printf("||*****************************************************************************||\n"); printf("\n"); printf("\n"); do { printf("Donner votre choix"); scanf("%d",&choix); }while (choix<1 || choix>3); do { switch(choix) { case 1: printf("||*****************************************************************************||\n"); printf("||*****************************************************************************||\n"); printf("||************ MENU DE GESTION DES PRETS POUR UN ADHERENT ************||\n"); printf("||*****************************************************************************||\n"); printf("||*****************************************************************************||\n"); printf("||*************************VEUILLEZ CHOISIR UNE ACTION*************************||\n"); printf("||*****************************************************************************||\n"); printf(" 1. Afficher les livres de la bibliothéque \n"); printf(" 2. Saisir un emprunt \n"); printf(" 3. Supprimer un emprunt \n"); printf(" 4. Consulter les emprunts relatifs à un adhérent \n"); printf("||*****************************************************************************||\n"); printf("||*****************************************************************************||\n"); printf(" 5. MENU PRINCIPAL \n"); printf("||*****************************************************************************||\n"); do { printf("donner votre choix1"); scanf("%d",&choix); }while (choix<1 || choix>5); do { switch(choix1) { case 1: printf("Afficher les livres dans la bibliothéque"); break; case 2: printf("Saisir un emprunt"); break; case 3: printf("Supprimer un emprunt"); break; case 4: printf("Consulter les emprunts realtifs à un adhérent"); break; case 5: printf("MENU PRINCIPAL"); break; } } while(choix1==5); printf("\n"); printf("\n"); printf("||*****************************************************************************||\n"); printf("||*****************************************************************************||\n"); printf("||*************BIENVENUE DANS LE MENU PRINCIPAL DE LA BIBLIOTHEQUE*************||\n"); printf("||*****************************************************************************||\n"); printf("||*****************************************************************************||\n"); printf("||********************* VEUILLEZ CHOISIR ***********************||\n"); printf("||*****************************************************************************||\n"); printf("||*****************************************************************************||\n"); printf(" 1. GESTION DES PRETS POUR UN ADHERENT \n"); printf(" 2. GESTION ET EVALUATION DE LA BIBLIOTHEQUE \n"); printf("||*****************************************************************************||\n"); printf("||*****************************************************************************||\n"); printf(" 3. QUITTER L'APPLICATION \n"); printf("||*****************************************************************************||\n"); printf("\n"); printf("\n"); } do { switch(choix) { case 2: printf("||*****************************************************************************||\n"); printf("||*****************************************************************************||\n"); printf("||*********** MENU DE GESTION ET EVALUATION DE LA BIBLIOTHEQUE ***********||\n"); printf("||*****************************************************************************||\n"); printf("||*****************************************************************************||\n"); printf("||*************************VEUILLEZ CHOISIR UNE ACTION*************************||\n"); printf("||*****************************************************************************||\n"); printf(" 1.Ajouter un livre \n"); printf(" 2.Supprimer un livre \n"); printf(" 3.Afficher le nombre d'exemplaires disponibles pour chaque livre \n"); printf(" 4.Afficher un ensemble d'emprunts relatifs à une date de retour prévue \n"); printf(" 5.Supprimer un ensemble d'emprunts \n"); printf(" 6.Afficher le(S) livre(S) le(S) plus empruntés dans une période donnée \n"); printf(" 7.Afficher le(S) emprunteurs(S) le(S) plus fidéle(S) \n"); printf("||*****************************************************************************||\n"); printf("||*****************************************************************************||\n"); printf(" 8.MENU PRINCIPAL \n"); printf("||*****************************************************************************||\n"); do { printf("donner votre choix2"); scanf("%d",&choix); }while (choix<1 || choix>8); do { switch(choix2) { case 1: printf("Ajouter un livre"); break; case 2: printf("Supprimer un livre"); break; case 3: printf("Afficher le nombre d'exemplaires disponibles pour chaque livre"); break; case 4: printf("Afficher un ensemble d'emprunts relatifs à une date de retour prévue"); break; case 5: printf("Supprimer un ensemble d'emprunts"); break; case 6: printf("Afficher le(S) livre(S) le(S) plus empruntés dans une période donnée"); break; case 7: printf("Afficher le(S) emprunteurs(S) le(S) plus fidéle(S)"); break; case 8: printf("MENU PRINCIPAL"); break; } } while(choix2==8); return 0 ; }
Что я уже пробовал:
я перепробовал все, я поставил переключатель на каждый из них, хотя я думал, что одного было достаточно для двух
Patrice T
объясните, откуда вы знаете, что есть ошибка.
Rick York
Вопрос для вас: как можно ожидать, что мы найдем ошибку, если мы не знаем, что это за ошибка?