Hey so I recently started learning C++ and I can't figure out why this problem is giving a false positive all the time.
Maybe someone can help?
// [Included stuff]
using namespace std;
int main() {
int erg = 5;
int inp;
cout << "Answer: 3 + 2: ";
cin >> inp;
if (inp == erg) {
cout << "True!";
};
if (inp <= erg || inp >= erg) {
cout << "False!";
}
else {
};
}

Aucun commentaire:
Enregistrer un commentaire