Tag: calculator

字符串计算器

嗨其他程序员, 我在C#创建一个计算器 我有一个字符串变量math ,其中包含100 * 5 – 2 如何在控制台中显示其输出498 ? 我的代码是这样的: String math = “100 * 5 – 2”; Console.WriteLine(math); Console.ReadLine(); // For Pause 所以基本上,我的代码给我的是字符串本身100 * 5 – 2 但我希望它能给我498个结果。 关于这一点的想法非常感谢。 谢谢