/*1:前言
本软件十大学生自己的软件。是一款超市管理系统。适合大学 c 语言课程设计。本人的
得力产品。这个可是满分卷丫。
2:内容
最好使用汉化版 tc 运行此程序。我给你介绍一个好的 win-tc。下载地址:
http://www.skycn.com/search.php
3:联系
4:谢谢支持。有事可联系我。
*/
#include<stdlib.h>
#include "dos.h"
#include "graphics.h"
#include "math.h"
#define PI 3.1415926
#define NULL 0
#include<stdio.h>
#include<string.h>
#include<time.h>
#include<conio.h>
#define LEN sizeof(struct goods1)
#include "Conio.h"
#include "graphics.h"
#define closegr closegraph
static char num[10],name[10];/*全局变量*/
static int mm,k,ff; /*静态全局变量*/
float zong3=0,zongzong=0;
struct goods3
{char num[20]; /*以下是定义 3 个结构体*/
char name[20];
float price;
int N;
float zprice;
char times[30];
}gds3[100];/*定义结构体类型变量*/
struct goods1
{char num[10];
char name[10];
float price;
}gds12;
struct goods2
{char num[10];
char name[10];
float price;
struct goods2 *next;/*指针在 dos 环境下占 2 个字节*/
};
void initgr(void) /* BGI 初始化 */
{
int gd = DETECT, gm = 0; /* 和 gd = VGA,gm = VGAHI 是同样效果 */
registerbgidriver(EGAVGA_driver);/* 注册 BGI 驱动后可以不需要.BGI 文件的支持运行 */
initgraph(&gd, &gm, "");
}
void Delay(int clicks)
{
unsigned int far *clock=(unsigned int far *)0x0000046CL;
unsigned int now;
now=*clock;
while(abs(*clock-now)<clicks){}
}
void drawmat(char *mat,int matsize,int x,int y,int color)
/*依次:字模指针、点阵大小、起始坐标(x,y)、颜色*/
{
int i, j, k, n;
n = (matsize - 1) / 8 + 1;
for(j = 0; j < matsize; j++)
for(i = 0; i < n; i++)
for(k = 0;k < 8; k++)
if(mat[j * n + i] & (0x80 >> k)) /*测试为 1 的位则显示*/
putpixel(x + i * 8 + k, y + j, color);
}
int hanxian1(void)
{ char cai64[]={
/* 以下是 '灌' 的 64 点阵方正黄草简体 字模,512 byte */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x03,0x80,0x01,0x80,0x00,0x00,
0x00,0x00,0x03,0xE0,0x01,0xF0,0x00,0x00,
0x00,0x00,0x03,0xE0,0x01,0xE0,0x00,0x00,
0x00,0x00,0x03,0xC0,0x01,0xC0,0x00,0x00,
0x00,0x00,0x03,0xC0,0x01,0xC0,0x03,0x00,
0x00,0x00,0x03,0xC0,0x01,0xC0,0x07,0x80,
0x03,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xC0,
0x01,0xF0,0x01,0xC0,0x01,0xC0,0x00,0x00,
0x00,0x00,0x01,0xC0,0x01,0xC0,0x00,0x00,
0x00,0x00,0x01,0xC0,0x01,0xC0,0x00,0x00,
0x00,0x00,0x01,0xC0,0x01,0xC0,0x00,0x00,
0x00,0x00,0xC1,0xC0,0x01,0xC0,0x00,0x00,
0x00,0x00,0xE1,0xC0,0x01,0xC0,0x00,0x00,
0x00,0x01,0xF9,0x00,0x01,0x00,0x00,0x00,
0x00,0x01,0xE0,0x00,0x20,0x00,0x00,0x00,
0x00,0x01,0xE0,0x00,0x20,0x00,0x08,0x00,
0x00,0x03,0xC0,0x06,0x30,0x00,0x1C,0x00,
0x00,0x03,0x80,0x0F,0x10,0x00,0x3E,0x00,
0x00,0x07,0xFF,0xFF,0x9F,0xFF,0xFF,0x00,
0x00,0x07,0x00,0x1F,0x18,0x00,0x3C,0x00,
0x00,0x0F,0x00,0x1E,0x0C,0x00,0x78,0x00,
0x00,0x0E,0xC0,0x1C,0x0C,0x00,0xF0,0x00,
0x00,0x1C,0x60,0x3C,0x06,0x00,0xE0,0x00,
0x00,0x1C,0x78,0x38,0x07,0x01,0xC0,0x00,
0x00,0x38,0x3C,0x78,0x03,0x01,0x80,0x00,
0x00,0x70,0x3C,0x70,0x01,0x83,0x00,0x00,
0x00,0x70,0x1C,0xF0,0x01,0xC7,0x00,0x00,
0x00,0xD8,0x18,0xE0,0x00,0xE6,0x00,0x00,
0x01,0x8E,0x09,0xE0,0x00,0xFC,0x00,0x00,
0x03,0x0F,0x03,0xC0,0x00,0x78,0x00,0x00,
0x02,0x07,0x03,0x80,0x01,0x3C,0x00,0x00,
0x04,0x07,0x87,0x80,0x03,0x9E,0x00,0x00,
0x00,0x07,0x0F,0x00,0x07,0xCF,0x80,0x00,
0x00,0x03,0x1E,0xFF,0xFF,0xE7,0xE0,0x00,
0x00,0x02,0x3C,0x40,0x00,0x03,0xF8,0x00,
0x00,0x00,0x78,0x00,0x00,0x01,0xFE,0x00,
0x00,0x00,0xF0,0x00,0x00,0x04,0x7F,0xE0,
0x00,0x01,0xE0,0x00,0x00,0x0E,0x3F,0xF8,
0x00,0x03,0x80,0x00,0x00,0x1F,0x0F,0xE0,
0x00,0x07,0xFF,0xFF,0xFF,0xFF,0x83,0xC0,
0x00,0x1C,0x78,0x00,0xE0,0x00,0x00,0x80,
0x00,0x38,0x00,0x00,0xE0,0x00,0x00,0x00,
0x00,0xE0,0x00,0x00,0xE0,0x00,0x00,0x00,
0x03,0x80,0x00,0x00,0xE0,0x00,0x00,0x00,
0x04,0x00,0x06,0x00,0xE0,0x80,0x00,0x00,
0x00,0x00,0x0F,0x00,0xE0,0x60,0x00,0x00,
0x00,0x00,0x1F,0x80,0xE0,0x3C,0x00,0x00,
0x00,0x00,0x3E,0x00,0xE0,0x0F,0x00,0x00,
0x00,0x00,0x7C,0x00,0xE0,0x07,0xC0,0x00,
0x00,0x00,0xF8,0x00,0xE0,0x01,0xF0,0x00,
0x00,0x01,0xE0,0x00,0xE0,0x00,0xF8,0x00,
0x00,0x03,0xC0,0x00,0xE0,0x00,0x7C,0x00,
0x00,0x07,0x00,0x01,0xE0,0x00,0x3E,0x00,
0x00,0x0E,0x01,0xFF,0xE0,0x00,0x3E,0x00,
0x00,0x38,0x00,0x3F,0xE0,0x00,0x1E,0x00,
0x00,0x60,0x00,0x1F,0xC0,0x00,0x0E,0x00,
0x01,0x80,0x00,0x07,0xC0,0x00,0x06,0x00,
0x00,0x00,0x00,0x07,0x80,0x00,0x00,0x00,
0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
char shi64[]={
/* 以下是 '灌' 的 64 点阵方正黄草简体 字模,512 byte */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x08,0x00,0x00,
0x00,0x00,0x00,0x10,0x00,0x0E,0x00,0x00,
0x00,0x00,0x00,0x1C,0x00,0x0F,0x80,0x00,
0x00,0x00,0x00,0x1E,0x00,0x0F,0xC0,0x00,
0x00,0x00,0x00,0x1F,0x00,0x0F,0x00,0x00,
0x00,0x08,0x00,0x1C,0x00,0x0F,0x00,0x00,
0x00,0x0E,0x00,0x1C,0x00,0x0F,0x00,0x00,
0x00,0x0F,0x80,0x1C,0x00,0x0F,0x00,0x00,
0x00,0x0F,0x80,0x1C,0x00,0x0F,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x80,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x01,0xC0,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x03,0xE0,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x07,0xF0,
0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1F,0xFF,0xFF,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x07,0x00,0x00,
0x00,0x0F,0x00,0x1C,0x00,0x04,0x00,0x00,
0x00,0x0F,0x00,0x18,0x00,0x00,0x00,0x00,
0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0xC0,
0x00,0x0F,0x00,0x00,0x00,0x00,0x01,0xE0,
0x00,0x0F,0x00,0x00,0x00,0x00,0x03,0xF0,
0x00,0x1F,0xFF,0xFF,0xFF,0xFF,0xFF,0xF8,
0x00,0x0F,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x06,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
};
char jie64[]={
/* 以下是 '灌' 的 64 点阵方正黄草简体 字模,512 byte */
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
0x00,0x02,0x00,0x00,0x00,0x00,0x40,0x00,
0x00,0x03,0x80,0x00,0x00,0x00,0xE0,0x00,
0x00,0x03,0xFF,0xFF,0xFF,0xFF,0xF0,0x00,
0x00,0x03,0x80,0x01,0xC0,0x01,0xF8,0x00,
0x00,0x03,0x80,0x01,0xC0,0x01,0xE0,0x00,
0x00,0x03,0x80,0x01,0xC0,0x01,0xE0,0x00,
0x00,0x03,0x80,0x01,0xC0,0x01,0xE0,0x00,