问题描述
编写一个程序,使用函数计算一个人的薪水。该计划应询问一个人的姓名,社会安全号码(使用假货),电话号码,地址,工作小时数(在一周内)和小时工资。如果他们的工作时间超过40小时,该计划还应包括加班费(时间和半年)。该计划还应征收联邦税(8%)。程序应将结果显示在屏幕上。程序应该运行直到用户选择退出。有以下功能。
?计算一个人的加班费(给定的一周)。
?计算个人工资的联邦税。
?计算一个人的税后工资
所有输入和输出都应在main中完成。输出应包括此人的姓名,社会安全号码,电话号码,地址,联邦税和税后支付。
在下一个实验的开始时为此程序设计。
?对于每个函数,说明它的参数是什么,它返回什么,以及它如何根据传递给它的参数值计算返回值。
?列出main中的步骤,包括函数调用。识别while循环中的内容。指示while循环的条件。
稍后您将修改此程序,以便除了将结果显示到屏幕外,它还会将信息写入名为paycheck.dat的文件中。
至少这一个是清晰,简洁,格式正确的英文。
这是我首先回复的唯一原因。否则我会忽略整个消息。啊...
Write a program that uses functions to calculate a person?s paycheck. The program should ask for a person?s first and last name, social security number (use fakes), phone number, address, hours worked (in the week), and hourly wage. The program should also include overtime (time and a half) if they have worked more than 40 hours. The program should also take out federal taxes (8%). The program should display the results to the screen. The program should run until the user chooses to quit. Have functions to do the following.
?Compute overtime for a person (for the given week).
?Compute federal tax on a person?s pay.
?Compute a person?s after-tax pay
All input and output should be done in main. The output should include the person?s first and last name, social security number, phone number, address, federal tax, and after-tax pay.
Turn in a design for this program at the beginning of the next lab.
?For each function, state what its parameters are, what it returns, and how it computes the returned value from the parameter values passed to it.
?List the steps in main, including function calls. Identify what is in the while loop. Indicate the condition for the while loop.
You will later modify this program so that, besides displaying the results to the screen, it will also write the information to a file called paycheck.dat.
At least this one was clear, concise, and well formatted with proper english.
That is the only reason I replied in the first place. Otherwise I would have just ignored the entire message. Ugh...
这篇关于帮我这个程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!