• 大小: 3.75 KB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2024-11-03
  • 语言: C/C++
  • 标签: C语言  

资源简介

用C语言写的一个简单系统,供学习C语言的学习者参考

资源截图

代码片段和文件信息

/*头文件*/
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 

/*所有函数声明*/
int t();
void design();
void show_mouse();

void entry();
void ventry(char t[]int);

void search();
void search_date();
void search_name();

void display();

void del();
void deletion_name();
void deletion_date();

int delete_file();

void graph();
void graph1();
void graph2();
void bar1(int inscor1);
void bar2(int inscore2);


struct shop
{
char name[20];
int quantity;
float sale;
char id[10];
float total;
};

struct shop temp;
struct shop x[20];

FILE *ptr;
char a[10];

/*显示当前时间函数*/
int t(void)
{
   time_t t;   
   time(&t);
   gotoxy(2421);
   printf(“Date: %s\n“ ctime(&t));
   return 0;
}

/*显示光标位置函数*/
void show_mouse(void)
{
union REGS in out;
in.x.ax = 0x1;
int86(0x33 &in &out);
}

/*程序框架函数*/
void design()
{
    int i;
    clrscr();
textcolor(14);
gotoxy(22);
cprintf(“\xC9“);
gotoxy(32);
       for(i=1;i<=74;i++)
       cprintf(“\xCD“);
gotoxy(772);
cprintf(“\xBB“);
gotoxy(23);
cprintf(“\xBA“);gotoxy(24);cprintf(“\xBA“);gotoxy(25);cprintf(“\xBA“);
gotoxy(26);cprintf(“\xBA“);gotoxy(27);cprintf(“\xBA“);gotoxy(28);cprintf(“\xBA“);
gotoxy(29);cprintf(“\xBA“);gotoxy(210);cprintf(“\xBA“);gotoxy(211);cprintf(“\xBA“);gotoxy(212);cprintf(“\xBA“);
gotoxy(213);cprintf(“\xBA“);gotoxy(214);cprintf(“\xBA“);gotoxy(215);cprintf(“\xBA“);gotoxy(216);cprintf(“\xBA“);
gotoxy(217);cprintf(“\xBA“);gotoxy(218);cprintf(“\xBA“);gotoxy(222);cprintf(“\xCC“);

gotoxy(219);cprintf(“\xBA“);gotoxy(220);cprintf(“\xBA“);gotoxy(221);cprintf(“\xBA“);gotoxy(224);cprintf(“\xC8“);
gotoxy(223);cprintf(“\xBA“);
gotoxy(324);
for(i=1;i<=74;i++)
cprintf(“\xCD“);
gotoxy(7718);cprintf(“\xBA“);gotoxy(7719);cprintf(“\xBA“);gotoxy(7720);cprintf(“\xBA“);gotoxy(7721);cprintf(“\xBA“);gotoxy(7724);cprintf(“\xBC“);
gotoxy(7723);
cprintf(“\xBA“);
gotoxy(322);
for(i=1;i<=74;i++)
cprintf(“\xCD“);
gotoxy(7722);
cprintf(“\xB9“);
gotoxy(773);
cprintf(“\xBA“);gotoxy(774);cprintf(“\xBA“);gotoxy(775);cprintf(“\xBA“);
gotoxy(776);cprintf(“\xBA“);gotoxy(777);cprintf(“\xBA“);gotoxy(778);cprintf(“\xBA“);
gotoxy(779);cprintf(“\xBA“);gotoxy(7710);cprintf(“\xBA“);gotoxy(7711);cprintf(“\xBA“);gotoxy(7712);cprintf(“\xBA“);
gotoxy(7713);cprintf(“\xBA“);gotoxy(7714);cprintf(“\xBA“);gotoxy(7715);cprintf(“\xBA“);gotoxy(7716);cprintf(“\xBA“);
gotoxy(7717);cprintf(“\xBA“);
    textcolor(4);
}

/*=================把接受的字符串类型转换整型或浮点型=================*/
void ventry(char t[]int code)
{
  int i=0;
  if(code==0)
  {

    while((t[i]=getch())!=‘\r‘ && i<30)
     if((t[i]>=97 && t[i]<=122) || (t[i]>=65 && t[i]<=90) || t[i]==32 || t[i]==8)
      { printf(“%c“t[i]);
i++;
}
      }
  else if(code==1)
  {
    while((t[i]=ge

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件      14236  2008-12-22 16:16  个人日常开支管理系统\个人日常开支管理系统.c

     文件        160  2008-12-20 22:21  个人日常开支管理系统\SHOP.DAT

     目录          0  2009-03-08 12:46  个人日常开支管理系统

----------- ---------  ---------- -----  ----

                14396                    3


评论

共有 条评论