C++商场销售管理系统 源代码

来源:百度知道 编辑:UC知道 时间:2024/05/06 07:46:15
1.简单一点的就可以
2.200行以上
3.不要用到数据库
链表我们没有学 能不能不要链表的阿 谢谢了

/*************************************************
问题补充:设计一个收银台结算程序:货品的信息有货品代码、
货品名称、货品价格、货品数量等,该程序能根据货品的输入代码
统计货品价格,对多个货品能做价格的累加统计并显示清单,
另具有找零功能。
需求:
1、实现对货品信息的输入和查询。
2、能根据货品的输入代码统计货品价格。
3、能对十个货品的价格统计并显示清单。
4、具有找零功能!
*************************************************/
//为了顺便练习一下使用链表结构,所以用链表结构实现。
// -----By kuaidh00--------2008/01/08-------------
//****************************************************
#include <iostream>
#include <string>
#include <iomanip>
#include <stdio.h>

using namespace std;

struct Sale
{
//数据域。
string m_code;
string m_name;
float m_price;
unsigned int m_quantity;
//指针域。
struct Sale* next;
};

typedef struct Sale Node;//取外别名,Node.
typedef Node* Link;//取个别名,Link.

//创建链表。
Link Create(Link Head)
{
//-----初始化头节点 Head-------
Head=(Link