需要帮助编写函数。 [英] Need help writing a function.

查看:82
本文介绍了需要帮助编写函数。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须使用enterData()函数和printCheck()函数编写程序。它必须被enterData()接受并传递给printCheck()。我需要能够输入日期,人名和姓名以及金额。任何人都可以帮助我开始吗?

I have to write a program using an enterData() function and a printCheck() function. It has to be accepted by enterData() and passed to printCheck(). I need to be able to input the date, a persons first and last name, and an amount. Can anyone help me get started?

推荐答案


我必须使用enterData()函数编写一个程序printCheck()函数。它必须被enterData()接受并传递给printCheck()。我需要能够输入日期,人名和姓名以及金额。任何人都可以帮助我开始吗?
I have to write a program using an enterData() function and a printCheck() function. It has to be accepted by enterData() and passed to printCheck(). I need to be able to input the date, a persons first and last name, and an amount. Can anyone help me get started?



因此,当您输入数据时,您正在读什么类型?如果失败你会怎么做?你将如何测试失败情况?你知道如何返回值吗?

So when you enter data, what type are you reading in? What will you do if it fails? How will you test the fail on condition? Do you know how to return values?


我几乎不知道这些东西。我不希望任何人为我做这件事,但我希望有人花时间帮助我并通过它告诉我,以便我学习它。
I hardly know any of this stuff. I don''t want anyone to do it for me but I would like someone to take the time to help me and talk me through it so that I learn it.



我不希望任何人为我做这件事,但我希望有人花时间帮助我,并通过它告诉我,以便我学习它。
I don''t want anyone to do it for me but I would like someone to take the time to help me and talk me through it so that I learn it.



当然,不是问题。但是你的问题是什么?如果你不确定从哪里开始,那么看看手头的问题。有这两个中心功能,显然您需要在打印支票之前输入数据。所以专注于让输入数据现在完美地工作。忘记打印检查。


你有四个对象要存储。从其中一个开始。让我们轻松一点吧。从名字开始。你怎么存储一个名字?这是C还是C ++?您的选择因此而异。所以现在只关注一件事。让enterData工作,现在,它所做的只是询问这个人的名字,并将其存储在程序中。


如果你不确定怎么办即使那么多,那么这里的问题就是根本不了解你的语言。解决方案是去cplusplus.com或cprogramming.com,或打开你的教科书,然后做一些阅读。

Sure, not a problem. But what''s your question? If you''re not sure where to get started, then look at the question at hand. There are these two central functions, and it''s obvious that you need to enter data before you can print a check. So focus on getting enter data to work perfectly for now. Forget about print check.

You have four objects to store. Start with one of them. Let''s make it easy. Start with the first name. How would you store a name? Is this C or C++? Your options vary depending on that. So focus on just one thing right now. Get enterData working, and for now, all it does is ask the person for his first name, and store that in the program.

If you aren''t sure how to go about even that much, then the problem here is just not knowing your language at all. The solution is to go to cplusplus.com or cprogramming.com, or open up your textbooks, and do some reading.


这篇关于需要帮助编写函数。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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