How to output message is input is the wrong length
Sep 30, 2019 at 11:12pm
How do I output a message is the input is the wrong length
1 2 3 4 5 6 7 8 9 10 11 12
|
int main()
{
int code;
int year , day , month;
cout << "Enter a date:";
cin >> digit>> code;
return 0;
}
| |
Sep 30, 2019 at 11:43pm
Read it into a string and use .length()
Topic archived. No new replies allowed.