Pesquisar na Comunidade
Mostrando resultados para as tags ''gabarito''.
Encontrado 1 registro
-
Preciso acrescentar no gabarito abaixo se o aluno foi aprovado ou não, já li sobre o assunto, mas não consegui, alguém pode me ajudar? #include <stdio.h> #include <conio.h> #include <math.h> #include <ctype.h> int main() { char gab[5] = { 'B', 'D', 'A', 'C', 'A' }; char resp[5]; int qtalunos; int nota; int y, i; printf("Informe a quantidade de alunos: "); scanf("%d", &qtalunos); for(i=1; i<=qtalunos;i++) { nota=0; for(y=0;y<5;y++) { printf("Informe a resposta da pergunta %d: ", y+1); scanf("%s", &resp[y]); } for(y=0;y<5;y++) { if(toupper(resp[y])==gab[y]) { nota = nota + 2; } } printf("A nota do aluno %d e: %d\n\n", i, nota); } getch(); }