Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- int main(void)
- {
- char question[50], reponses[3][50];
- int type, notes[3];
- printf("veillez entrer votre question : ");
- fgets(question, 50, stdin);
- printf("veillez selectionner son type : \n");
- printf("1. vrai ou faux.\n");
- printf("2. choix unique.\n");
- printf("3. choix multiple.\n");
- printf("veillez choisir : ");
- scanf("%d", &type);
- getchar();
- if(type == 1)
- {
- strcpy(reponses[0], "vrai");
- strcpy(reponses[1], "faux");
- }
- else
- {
- for(int i = 0; i < 3; i++)
- {
- printf("veillez entrer une reponse : ");
- fgets(reponses[i], 50, stdin);
- printf("veillez entrer sa note : ");
- scanf("%d", ¬es[i]);
- getchar();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement