arras&功能 [英] arras&function

查看:83
本文介绍了arras&功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用二维数组解决以下问题.一个公司有四个销售员(1到4),他们销售5种不同的产品(1到5).每天一次,每个销售员都会针对每种不同类型的产品传递一张纸条.每个单据包含以下内容:
a.销售人员编号b.产品编号
c.当天售出的该产品的总美元价值
因此,每个销售员每天传递0到5个销售单.假定上个月所有票据的信息均可用.编写一个程序,将读取上个月销售的所有这些信息,并按销售人员按产品汇总总销售.所有总计应存储在二维数组销售中.处理完上个月的所有信息后,以表格格式打印结果,每个列代表一个特定的销售人员,每个行代表一个特定的产品.交叉总计每一行,以获取上个月每种产品的总销售额;将各列相加,得出销售人员上个月的总销售额.表格打印输出应在总计行的右侧包括这些交叉总计.

Use a two-dimensional array to solve the following problem. A company has four salespeople (1 to 4) who sell five different products (1 to 5). Once a day, each salesperson passes in a slip for each different type of product sold. Each slip contains the following:
a.The salesperson number b.The product number
c.The total dollar value of that product sold that day
Thus, each salesperson passes in between 0 and 5 sales slips per day. Assume that the information from all of the slips for last month is available. Write a program that will read all this information for last month''s sales and summarize the total sales by salesperson by product. All totals should be stored in the two-dimensional array sales. After processing all the information for last month, print the results in tabular format with each of the columns representing a particular salesperson and each of the rows representing a particular product. Cross total each row to get the total sales of each product for last month; cross total each column to get the total sales by salesperson for last month. Your tabular printout should include these cross totals to the right of the totaled rows

推荐答案

没有人会为您做作业.如果您对遇到的问题有特定的疑问,请走开.如果您正在寻找源代码,请不要理会它.您不会把别人的工作当做自己的工作,这样您就可以欺诈地通过课程.
Nobody is going to do your homework for you. If you''ve got specific questions on a problem you''re having, ask away. If you''re looking for source code, forget it. You''re not going to turn in someone elses work as your own so you can fraudulently pass a class.


这篇关于arras&功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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