Whenever I put in anything that isn't an int, it outputs good morning instead of the error under else
#include <iostream>
using namespace std;
int main() {
int time;
cout << "what time is it?\n";
cin >> time;
if (time < 12)
{
cout << "Good morning\n";
}
else if ( time >= 12)
{
cout << "Good afternoon\n";
}
else
{
cout << "Sorry, i do not recognize that input\n";
}
}