Commit b14981ae022b55a958ec8898f856bf2d7a98f306

Authored by David Deharbe
1 parent c1b0f96d7c
Exists in master

Removed temp files.

Showing 2 changed files with 0 additions and 38 deletions Inline Diff

slides/au04/sa View file @ b14981a

No preview for this file type

slides/au04/sa.c View file @ b14981a
/* sistema academico */ 1 File was deleted
#include <stdio.h> 2
3
int main(void) 4
{ 5
int N1, N2, N3, N4, N5; 6
/* leitura das notas */ 7
scanf("%i %i %i %i %i", &N1, &N2, &N3, &N4, &N5); 8
9
/* verificar se o aluno passou direto */ 10
if (N1 + N2 + N3 + N4 + N5 >= 70*5 && /* a media maior ou igual a 70 */ 11
N1 >= 50 && /* e cada nota maior ou igual a 50 */ 12
N2 >= 50 && 13
N3 >= 50 && 14
N4 >= 50 && 15
N5 >= 50) 16
{ 17
printf("S\n"); 18
} 19
/* verificar se o aluno foi para a reposicao */ 20
else if (N1 + N2 + N3 + N4 + N5 >= 30*5) 21
{ 22
int NR; 23
scanf("%i", &NR); 24
/* verificar se o aluno passou na reposicao */ 25
if (N1 + N2 + N3 + N4 + N5 + 5 * NR >= 50*10) /* media final maior ou igual a 50 */ 26
printf("S\n"); 27
else 28
printf("R\n"); 29
} 30
/* o aluno nem foi para a reposicao */ 31
else 32
{ 33
printf("R\n"); 34
} 35