Commit b14981ae022b55a958ec8898f856bf2d7a98f306
1 parent
c1b0f96d7c
Exists in
master
Removed temp files.
Showing 2 changed files with 0 additions and 38 deletions Side-by-side Diff
slides/au04/sa
View file @
b14981a
slides/au04/sa.c
View file @
b14981a
1 | -/* sistema academico */ | |
2 | -#include <stdio.h> | |
3 | - | |
4 | -int main(void) | |
5 | -{ | |
6 | - int N1, N2, N3, N4, N5; | |
7 | - /* leitura das notas */ | |
8 | - scanf("%i %i %i %i %i", &N1, &N2, &N3, &N4, &N5); | |
9 | - | |
10 | - /* verificar se o aluno passou direto */ | |
11 | - if (N1 + N2 + N3 + N4 + N5 >= 70*5 && /* a media maior ou igual a 70 */ | |
12 | - N1 >= 50 && /* e cada nota maior ou igual a 50 */ | |
13 | - N2 >= 50 && | |
14 | - N3 >= 50 && | |
15 | - N4 >= 50 && | |
16 | - N5 >= 50) | |
17 | - { | |
18 | - printf("S\n"); | |
19 | - } | |
20 | - /* verificar se o aluno foi para a reposicao */ | |
21 | - else if (N1 + N2 + N3 + N4 + N5 >= 30*5) | |
22 | - { | |
23 | - int NR; | |
24 | - scanf("%i", &NR); | |
25 | - /* verificar se o aluno passou na reposicao */ | |
26 | - if (N1 + N2 + N3 + N4 + N5 + 5 * NR >= 50*10) /* media final maior ou igual a 50 */ | |
27 | - printf("S\n"); | |
28 | - else | |
29 | - printf("R\n"); | |
30 | - } | |
31 | - /* o aluno nem foi para a reposicao */ | |
32 | - else | |
33 | - { | |
34 | - printf("R\n"); | |
35 | - } | |
36 | - | |
37 | - return 0; | |
38 | -} |