帮我看看为什么输入不了运算符号那步
做了个计算器程序,但是输入运算符号那步直接跳过去了
Console.WriteLine("请输入第一个数");
float oneNumberInCalculator;
oneNumberInCalculator = Console.Read();
Console.WriteLine("请输入运算符号");
Console.WriteLine("1为加,2为减,3为乘,4为除");
int arithmeticSymbol;
arithmeticSymbol = Console.Read();
if (arithmeticSymbol == 1)
{
Console.WriteLine("请输入第二个数");
float twoNumberInCalculater;
twoNumberInCalculater = Console.Read();
Console.WriteLine("运算结果为");
Console.WriteLine(oneNumberInCalculator + twoNumberInCalculater);
}
if (arithmeticSymbol == 2)
{
Console.WriteLine("请输入第二个数");
float twoNumberInCalculater;
twoNumberInCalculater = Console.Read();
Console.WriteLine("运算结果为");
Console.WriteLine(oneNumberInCalculator - twoNumberInCalculater);
}
if (arithmeticSymbol == 3)
{
Console.WriteLine("请输入第二个数");
float twoNumberInCalculater;
twoNumberInCalculater = Console.Read();
Console.WriteLine("运算结果为");
Console.WriteLine(oneNumberInCalculator * twoNumberInCalculater);
}
if (arithmeticSymbol == 4)
{
Console.WriteLine("请输入第二个数");
float twoNumberInCalculater;
twoNumberInCalculater = Console.Read();
Console.WriteLine("运算结果为");
Console.WriteLine(oneNumberInCalculator / twoNumberInCalculater);
}