-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaula10.cpp
More file actions
44 lines (32 loc) · 816 Bytes
/
aula10.cpp
File metadata and controls
44 lines (32 loc) · 816 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
40
41
42
43
44
#include <iostream>
#include <cstdlib>
using namespace std;
int main() {
int n1,n2,res;
char opc;
inicio: //lable, ao encontrá-lo, retorna no loop
system("cls"); //comando do DOS para limpar a tela pós loop e, pra ele funcionar, precisa adc biblioteca <cstdlib>""
cout << "Digite o valor da nota 1: ";
cin >> n1;
cout << "Digite o valor da nota 2: ";
cin >> n2;
res=n1+n2;
/*
>=60 Aprovado
>=40 e <60 Recuperação
<40 Reprovado
*/
if(res >= 60) {
cout << "\nAluno aprovado\n";
}else if(res >=40) {
cout << "\nRecuperação\n";
}else {
cout << "\nAluno reprovado\n";
}
cout << "\nDigitar outras notas? (s/n): \n";
cin >> opc;
if(opc=='s' or opc=='S') {
goto inicio;
}
return 0;
}