我想从键盘输入数字和操作员。如何解决这些问题? [英] i want to input number and operator from keyboard. how to solve these problem?
本文介绍了我想从键盘输入数字和操作员。如何解决这些问题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好!现在我尝试制作计算器,一切都很好。但我想从键盘输入数字和运算符(+, - ,。,*)....能否帮我解决这些问题。
Hello! Now i try to make Calculator, Everything good. But i want to input number and operator( +, -, ., *).... from keyboard. Can you please help me to solve these problem.
推荐答案
你可以通过多种方式做到这一点,以及你想要生产什么类型的计算器你工作的环境将决定很多因素。
所以请坐下来,准确计算你想要的产品:
1)一个传统计算器,每个键都有单独的屏幕按钮
2)一个现代计算器,如Microsoft Mathematics,你输入一个字符串,如102 + 405 =和它从那里开始工作。
然后找出你将在哪个环境 - 例如Console,WinForms,WPF或基于网络 - 并考虑一下你将如何在这种环境中实施。
但是我们不会为你做这件事 - 如果我们为你做功课,你就没有学到任何有用的东西!
所以亲自尝试一下,你会发现它并不像你想象的那么难!
如果您遇到特定问题,请询问相关问题,我们会尽力提供帮助。但我们不打算为你做这一切!
There are a huge number of ways you could do this, and exactly what type of calculator you want to produce and the environment you are working in will determine a lot of factors.
So sit down, work out exactly what you want to produce:
1) A "traditional" calculator with separate on-screen buttons for each key
2) A "modern" calculator such as Microsoft Mathematics where you type in a string such as "102+405=" and it works it out from there.
Then work out what environment you will be working in - Console, WinForms, WPF, or web-based for example - and think about how you will need to implement in that environment.
But we aren't going to do it for you - you learn nothing useful if we do your homework for you!
So try it yourself, you may find it is not as difficult as you think!
If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!
这篇关于我想从键盘输入数字和操作员。如何解决这些问题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文