C ++ Calculator App,无法获得MIN& MAX工作。 [英] C++ Calculator App, can't get MIN & MAX to work.
本文介绍了C ++ Calculator App,无法获得MIN& MAX工作。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试创建一个计算器,但对于我的混音和最大值,我没有得到正确的结果。我很确定这很糟糕但是如何修复它?
I''m trying to create a calculator, but for my mix and max, I''m not getting the correct results. I''m pretty sure this is bad but how to fix it?
展开 | 选择 | Wrap | 行号
推荐答案
我倾向于跳过其他
I tend to skip the else
展开 | 选择 | Wrap | 行号
尝试过,并且没有工作。我用更多代码更新了帖子
Tried that and doesn''t work. I updated the post with more code
你发布的变量使用了哪些数据类型?
你的parens可能很重要。 3/4 * 4/10可能会产生愚蠢的结果,如果你的意思是(3/4)*(4/10)
注意任何整数除法
what data types are you using on your variables posted?
your parens may be important. 3 / 4 * 4 / 10 may yield goofy results if you really mean (3 / 4) * (4 / 10)
look out for any integer division
这篇关于C ++ Calculator App,无法获得MIN& MAX工作。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文