-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexpress.cpp
More file actions
21 lines (19 loc) · 747 Bytes
/
express.cpp
File metadata and controls
21 lines (19 loc) · 747 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#include <iostream>
using namespace std;
int main(int argc, char *argv[])
{
int x;
std::cout << "The expression x = 100 has the value " << std::endl;
std::cout << (x = 100) << std::endl;
std::cout << "now x = " << x<< std::endl;
std::cout << "the expresion x < 3 has the value" << std::endl;
std::cout << (x < 3) << std::endl;
std::cout << "the expresion x > 3 has the value" << std::endl;
std::cout << (x > 3) << std::endl;
cout.setf(ios_base::boolalpha);
std::cout << "the expression x < 3 has the value " << std::endl;
std::cout << (x < 3) << std::endl;
std::cout << "the expresion x > 3 has the value" << std::endl;
std::cout << (x > 3) << std::endl;
return 0;
}