- #1
ineedhelpnow
- 651
- 0
Set hadDigit to true if the 3-character passCode contains a digit.
Sample program:
I'm super lost on this. I could definitely use some help/hints. Thanks
Sample program:
Code:
#include
#include
#include
using namespace std;
int main() {
bool hasDigit = false;
string passCode;
int valid = 0;
passCode = "abc";
<student code>
if (hasDigit) {
cout << "Has a digit." << endl;
}
else {
cout << "Has no digit." << endl;
}
return 0;
}
I'm super lost on this. I could definitely use some help/hints. Thanks