#include <iostream>
#include <string>
using namespace std;
int main()
{
int userInput;
string numberType;
cout << "Enter a number and I will Check to see if it is odd or even" << endl;
cin >> userInput;
if (userInput % 2 == 0)
{
string numberType = "Even";
}
else
{
string numberType = "Odd";
}
cout << "The number you input is " << numberType << endl;
return 0;
}
我正在尝试输出经过操作的字符串值,但最后一行输出的字符串显示为空白?