PROGRAMA EM C_SISTEMA DE AVALIAÇAO DE ALUNOS

1035 palavras 5 páginas
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char *argv[]) { /*
Os alunos são identificados em números sequenciais de 10001 a 10006.
O sistema armazena duas notas: P1 e P2 com valores válidos entre 0.0 e 10.0.
A média considerada deve ser: 0,4P1 + 0,6P2 e deve totalizar 6,0 para aprovação.

*/

int RA,OP, MENU_PRINCIPAL,x,y,z=0; float P1_A1,P2_A1,MEDIA_A1,P1_A2,P2_A2,MEDIA_A2,P1_A3,P2_A3,MEDIA_A3,P1_A4,P2_A4,MEDIA_A4,P1_A5,P2_A5,MEDIA_A5,P1_A6,P2_A6,MEDIA_A6=0;

printf("***SISTEMA DE AVALIACAO DO ALUNO***\n DIGITE A OPCAO DESEJADA\n\n"); printf("1 - Receber notas P1 de todos os alunos.\n"); printf("2 - Receber notas P2 de todos os alunos.\n"); printf("3 - Receber nota P1 de um aluno.\n");
//printf("4 - Verificar a condicao de um aluno.\n"); printf("4 - Listar alunos em intervalo.\n"); printf("5 - Listar todos os alunos.\n"); printf("0 - Termina o programa.\n\n"); scanf("%OP",&OP); switch(OP) {

case 1: { printf("Voce escolheu a opcao 1\n"); printf("Escreva a nota P1 de cada aluno\n\n\n"); printf("Aluno 1\n"); scanf("%f",&P1_A1); printf("Aluno 2\n"); scanf("%f",&P1_A2);

printf("Aluno 3\n"); scanf("%f",&P1_A3); printf("Aluno 4\n"); scanf("%f",&P1_A4); printf("Aluno 5\n"); scanf("%f",&P1_A5);

printf("Aluno 6\n"); scanf("%f",&P1_A6); printf("Aluno 1 - RA-10001 nota P1=%0.2f\n",P1_A1); printf("Aluno 2 - RA-10002 nota P1=%0.2f\n",P1_A2); printf("Aluno 3 - RA-10003 nota P1=%0.2f\n",P1_A3); printf("Aluno 4 - RA-10002 nota P1=%0.2f\n",P1_A4); printf("Aluno 5 - RA-10005 nota P1=%0.2f\n",P1_A5); printf("Aluno 6 - RA-10006 nota P1=%0.2f\n",P1_A6); }break; case 2: { printf("Voce escolheu a opcao 2\n"); printf("Escreva a nota P2 de cada aluno\n\n\n"); printf("Aluno 1\n"); scanf("%f",&P2_A1); printf("Aluno 2\n"); scanf("%f",&P2_A2);

Relacionados