-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrelational.cpp
More file actions
42 lines (34 loc) · 833 Bytes
/
Copy pathrelational.cpp
File metadata and controls
42 lines (34 loc) · 833 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
#include <iostream>
using namespace std;
int main() {
int a = 34;
int b = 23;
int c ;
if( a == b ) {
cout << "Line 1 - a is equal to b" << endl ;
} else {
cout << "Line 1 - a is not equal to b" << endl ;
}
if ( a < b ) {
cout << "Line 2 - a is less than b" << endl ;
} else {
cout << "Line 2 - a is not less than b" << endl ;
}
if ( a > b ) {
cout << "Line 3 - a is greater than b" << endl ;
} else {
cout << "Line 3 - a is not greater than b" << endl ;
}
/* Let's change the values of a and b */
a = 15;
b = 18;
if ( a <= b ) {
cout << "Line 4 - a is either less than \
or euqal to b" << endl ;
}
if ( b >= a ) {
cout << "Line 5 - b is either greater than \
or equal to b" << endl ;
}
return 0;
}