There\'s something wrong with my code. Could someone help? #include <iostream.h>
ID: 3623774 • Letter: T
Question
There's something wrong with my code. Could someone help?#include <iostream.h>
int main(void) {
int x = 0;
int y = 0;
cout << "Please enter an integer between 1 and 10: "
cin >> x;
cout << "You entered: " < x << endl << endl;
while ((x < 1) || (x > 10)) {
cout << "Please enter an integer between 1 and 10: ";
cin >> x;
cout < "You entered: " << x << endl << endl;
if ((x < 1) | (x > 10))
cout << "Your value for x is not between 1 and 10!"
<< endl;
cout << "Please re-enter the number!" << endl << endl;
}
}
cout << "Thank you for entering a valid number!" << endl;
return 0;
}