公式打印程序 [英] Equation printing program

查看:70
本文介绍了公式打印程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我有一个关于我应该如何开始这样做的问题... c ++的新内容

i必须向用户询问整数,运算符,然后是另一个整数给出答案。但我也必须展示整个方程式。我想尝试使用循环来执行此操作。

So i have a question on how i should start doing this... pretty new at c++

i have to ask the user for an integer, an operator, and then another integer to give an answer. But i also have to show the whole equation. I want to try to use loops to do this.

推荐答案


所以我有一个关于我应该如何开始的问题这样做......在c ++上很新。


i必须要求用户输入一个整数,一个运算符,然后是另一个整数来给出答案。但我也必须展示整个方程式。我想尝试使用循环来做到这一点。
So i have a question on how i should start doing this... pretty new at c++

i have to ask the user for an integer, an operator, and then another integer to give an answer. But i also have to show the whole equation. I want to try to use loops to do this.



所以你想要反复询问用户所有输入*不是吗?不是吗?否则

我没有看到任何循环的原因,除非你想让你的程序健壮

并且如果用户做出反复请求正确的输入一个错误。


亲切的问候,


Jos

So you want to ask the user for all that input *repeatedly* don''t you? Otherwise
I don''t see any reason for a loop except if you want to make your program robust
and ask for correct input over and over again if the user makes a mistake.

kind regards,

Jos


我想问用户放入整数,然后是运算符,然后是下一个整数但不是一次整数。然后,如果他们把2 + +然后3我需要它说2 + 3 = 5


Well i want to ask the user to put in the integer and then the operator and then the next integer but not all at once. and then if they put 2 a + then a 3 i need it to say 2+3=5




所以你想要反复询问用户所有的输入*不是吗?不是吗?否则

我没有看到任何循环的原因,除非你想让你的程序健壮

并且如果用户做出反复请求正确的输入一个错误。


亲切的问候,


Jos
So you want to ask the user for all that input *repeatedly* don''t you? Otherwise
I don''t see any reason for a loop except if you want to make your program robust
and ask for correct input over and over again if the user makes a mistake.

kind regards,

Jos



好​​吧我想让用户输入整数然后是运算符然后是下一个整数但不是一次全部。然后,如果他们把2 + +然后3我需要它说2 + 3 = 5
Well i want to ask the user to put in the integer and then the operator and then the next integer but not all at once. and then if they put 2 a + then a 3 i need it to say 2+3=5



好​​吧,让我们从那里开始,但它没有循环;伪代码警报:

Well, let''s start there then but it doesn''t take a loop; pseudo code alert:

展开 | 选择 | Wrap | 行号


这篇关于公式打印程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆