-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1129 - Leitura Óptica.c
40 lines (34 loc) · 982 Bytes
/
1129 - Leitura Óptica.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#include<stdio.h>
int main (void){
int vet[5], menor, pos, l;
scanf("%d", &l);
while(l > 0){
for(int i = 0; i < l; i++){
menor = 0;
for(int j = 0; j < 5; j++)
scanf("%d", &vet[j]);
for(int j = 0; j < 5; j++){
if(vet[j] <= 127){
menor++;
if(menor > 1)
break;
else
pos = j;
}
}
if(menor > 1 || menor == 0)
printf("*\n");
else{
switch (pos){
case 0: printf("A\n"); break;
case 1: printf("B\n"); break;
case 2: printf("C\n"); break;
case 3: printf("D\n"); break;
case 4: printf("E\n");
}
}
}
scanf("%d", &l);
}
return 0;
}