Hi,
I have a program which needs to accept a date,
it can only accept under 30 days, and the entry has to be over 0
My problem is that it accepts anything, it doesnt make sense because i have used the exact layout on other bits of code which work perfectly,
do {
cout << "Please enter day: ";
cin >> day;
system("cls");
}
while ((day >= 0) & (day <= 30));
cout << "Day Accepted";
Sleep(1000);
system("cls");
All it does is go straight to day accepted no matter what,
i have tried using { on the while part,
i am using devcpp