#include <iostream>
using namespace std;
int main() { //Main Function
int w;
cout << "enter the weight of the watermelon: ";
cin >> w;
if (w <= 1 or w >= 100) {
cout << "error";
}
else {
if (w % 2 == 0) {
cout << "YES";
}
else {
cout << "NO";
}
}
return 0;
Compilation Errors:
syntax error: missing ')' before identifier 'or'
error C2065: 'or': undeclared identifier
error C2146: syntax error: missing ';' before identifier 'w'
error C2059: syntax error: ')'
error C2059: syntax error: ';'
error C2059: syntax error: 'else'
error C2143: syntax error: missing ';' before '{'
error C2447: '{': missing function header (old-style formal list?)
error C2059: syntax error: 'return'
error C2059: syntax error: '}'
error C2143: syntax error: missing ';' before '}'