-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaula11.cpp
More file actions
58 lines (44 loc) · 1.02 KB
/
aula11.cpp
File metadata and controls
58 lines (44 loc) · 1.02 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#include <iostream>
using namespace std;
int main() {
/* operadores lógicos
AND (&&) todos os testes devem ser atendidas = true
OR (||) pelo menos um dos testes atendidos = true
NOT (!) vai inverter o valor em um teste
*/
/*
int num;
num=6;
if(num >4 && num <7){
cout << "\n\nValor aceito\n";
}else {
cout << "\n\nNão aceito\n";
}
*/
/*
int num2;
num2=9;
if(num2 <3 || num2>8 ){
cout << "\n\nValor aceito\n\n";
}else {
cout << "\n\nNão aceito\n\n";
}
*/
/*
int num3;
num3=7;
if((num3 >=3 && num3 <=6) || (num3 >9 && num3 <15) || (num3 >15 && num3 <20)) {
cout << "\n\nValor aceito\n\n";
}else {
cout << "\n\nNão aceito\n\n";
}
*/
int num4;
num4=1; //1 == verdadeiro/true e 0 == falso/false
if(!num4) { //se num4 não for verdadeiro pois o NOT inverte
cout << "\n\nVou ao clube\n\n";
}else {
cout << "\n\nVou ao cinema\n\n";
}
return 0;
}