Hello,
I get this error when I try to compile the code below. Why won't the Borland 5.5 compiler accept the and, or keywords?
Error E2293 Boolean3.cpp 17: ) expected in function main()
// Boolean3.cpp
#include <iostream>
using namespace std;
int main() {
double i,j;
cout << "Enter a value (float): ";
cin >> i;
cout << "Enter another value (float): ";
cin >> j;
cout << "i > j is " << (i > j) << endl;
cout << "i < j is " << (i < j) << endl;
cout << "i >= j is " << (i >= j) << endl;
cout << "i <= j is " << (i <= j) << endl;
cout << "i == j is " << (i == j) << endl;
cout << "i not_eq j is " << (i not_eq j) << endl;
cout << "i and j is " << (i and j) << endl;
cout << "i or j is " << (i or j) << endl;
cout << " (i < 10) and (j < 10) is "
<< ((i < 10) and (j < 10)) << endl;
}
Seron
I get this error when I try to compile the code below. Why won't the Borland 5.5 compiler accept the and, or keywords?
Error E2293 Boolean3.cpp 17: ) expected in function main()
// Boolean3.cpp
#include <iostream>
using namespace std;
int main() {
double i,j;
cout << "Enter a value (float): ";
cin >> i;
cout << "Enter another value (float): ";
cin >> j;
cout << "i > j is " << (i > j) << endl;
cout << "i < j is " << (i < j) << endl;
cout << "i >= j is " << (i >= j) << endl;
cout << "i <= j is " << (i <= j) << endl;
cout << "i == j is " << (i == j) << endl;
cout << "i not_eq j is " << (i not_eq j) << endl;
cout << "i and j is " << (i and j) << endl;
cout << "i or j is " << (i or j) << endl;
cout << " (i < 10) and (j < 10) is "
<< ((i < 10) and (j < 10)) << endl;
}
Seron