简单类加四个数字 [英] Simple class to add four numbers

查看:84
本文介绍了简单类加四个数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试编写一个课堂程序,该程序接受输入的4个数字,每个数字乘以不同的价格,并得出每个数字的总和.然后,我需要得到这4的小计并加税,然后得出总价.

[edit]不要大喊!这一切都输了.而不是有用的标题.[/edit]

I have been trying to write a program for class that takes 4 numbers entered multplies each one by a different price and gives a total for each one. Then I need to get a subtotal of those 4 and add tax to it then give a total price.

[edit]Don''t shout! LOST ON ALL THIS is shouting. And not a helpful title.[/edit]

推荐答案

1.  Prompt the user for :
customer name
number of pounds of each of the four varieties of nuts
2.  Display an output invoice showing:
      the variety (type of nut)
weight (pounds ordered)
cost (cost per pound times number of pounds ordered)

3.  each type should be followed by a subtotal, amount of tax, and total due.

Nut types:
    Cashews


6.每磅50 澳洲坚果
6.50 per pound Macadamia nuts


7.每磅 25 带壳螺母
7.25 per pound In-shell nuts


这篇关于简单类加四个数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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