-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExercicio6.cpp
More file actions
39 lines (31 loc) · 891 Bytes
/
Copy pathExercicio6.cpp
File metadata and controls
39 lines (31 loc) · 891 Bytes
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
#include <conio.h>
#include <stdio.h>
#include <string>
#include <iostream>
#include <vector>
int main()
{
std::vector<std::string> ras[15];
std::vector<float> notas[15];
std::string ra;
for (int i=0; i<3; i++){
printf("Insira o RA:\n");
scanf ("%s",&ras[i]);
printf("Insira a nota:\n");
scanf ("%f",¬as[i]);
}
printf("Digite um RA para verificar a nota: \n");
scanf ("%s",&ra);
bool search = true;
while(search){
for (int i=0; i<3; i++){
if (ra == ras[i]){
printf("A nota desse aluno é: %f \n", notas[i]);
search = false;
} else
printf("Aluno não encontrado, tente novamente. \n");
}
}
getch();
return 1;
}