求助C语言编译个人财务管理系统!(尽快啊)

Python08

求助C语言编译个人财务管理系统!(尽快啊),第1张

/******头文件(.h)***********/

#include "stdio.h" /*I/O函数*/

#include "stdlib.h" /*标准库函数*/

#include "string.h"/*字符串函数*/

#include "ctype.h" /*字符操作函数*/

#define M 200 /*定义常数表示记录数*/

typedef struct /*定义数据结构*/

{

char name[20]/*姓名*/

char units[30]/*单位*/

char tele[10]/*电话*/

char product_company[30]/* 生产厂家 */

char designer[30]/* 设计者 */

char price[10] /* 价格 */

char kucun[10] /* 库存量 */

char year[4]/* 出厂年份 */

char month[2] /* 出厂月份 */

char day[2] /* 出厂 */

}ADDRESS

/******以下是函数原型*******/

int enter(ADDRESS t[])/*输入记录*/

void list(ADDRESS t[],int n)/*显示记录*/

void search(ADDRESS t[],int n)/*按姓名查找显示记录*/

int delete(ADDRESS t[],int n)/*删除记录*/

int add(ADDRESS t[],int n)/*插入记录*/

void save(ADDRESS t[],int n)/*记录保存为文件*/

int load(ADDRESS t[])/*从文件中读记录*/

void display(ADDRESS t[])/*按序号查找显示记录*/

void sort(ADDRESS t[],int n)/*按姓名排序*/

void modify_price(ADDRESS t[],int n)/*快速查找记录*/

void copy()/*文件复制*/

void print(ADDRESS temp)/*显示单条记录*/

int find(ADDRESS t[],int n,char *s) /*查找函数*/

int menu_select()/*主菜单函数*/

/******主函数开始*******/

main()

{

int i

ADDRESS adr[M]/*定义结构体数组*/

int length=0/*保存记录长度*/

clrscr()/*清屏*/

for()/*无限循环*/

{

clrscr()/*清屏*/

switch(menu_select()) /*调用主菜单函数,返回值整数作开关语句的条件*/

{

case 0:length=enter(adr)break/*输入记录*/

case 1:list(adr,length)break/*显示全部记录*/

case 2:search(adr,length)break/*查找记录*/

case 3:length=delete(adr,length)break/*删除记录*/

case 4:length=add(adr,length)break/*插入记录*/

case 5:save(adr,length)break/*保存文件*/

case 6:modify_kucun(adr,length)break/*读文件*/

case 7:display(adr)break/*按序号显示记录*/

case 8:sort(adr,length)break/*按姓名排序*/

case 9:modify_kucun(adr,length)break/*快速查找记录*/

case 10:copy()break/*复制文件*/

case 11:exit(0)/*如返回值为11则程序结束*/

}

}

}

/*菜单函数,函数返回值为整数,代表所选的菜单项*/

menu_select()

{

char s[80]

int c

/*gotoxy(1,25)*//* 将光标定为在第25行,第1列*/

printf("press any key enter menu......\n")/*提示压任意键继续*/

getch()/*读入任意字符*/

clrscr()/*清屏*/

/*gotoxy(1,1)*/

printf("********************MENU*********************\n\n")

printf(" 0. Enter record\n")

printf(" 1. List the file\n")

printf(" 2. Search record on name\n")

printf(" 3. Delete a record\n")

printf(" 4. add record \n")

printf(" 5. Save the file\n")

printf(" 6. Modify kucun\n")

printf(" 7. Display record on order\n")

printf(" 8. Sort to make new file\n")

printf(" 9. Quick seek record\n")

printf(" 10. Copy the file to new file\n")

printf(" 11. Quit\n")

printf("***********************************************\n")

do{

printf("\n Enter you choice(0~11):")/*提示输入选项*/

scanf("%s",s) /*输入选择项*/

c=atoi(s) /*将输入的字符串转化为整型数*/

}while(c<0||c>11)/*选择项不在0~11之间重输*/

clrscr()/*清屏*/

return c/*返回选择项,主程序根据该数调用相应的函数*/

}

/***输入记录,形参为结构体数组,函数值返回类型为整型表示记录长度*/

int enter(ADDRESS t[])

{

int i,n

char *s

clrscr()/*清屏*/

do{

printf("\nHow many numbers do you want to record?\nplease input the numbers you wanted:\n")/*提示信息*/

scanf("%d",&n)/*输入记录数*/

if(n==0)

printf("the num couldn't be '0'!Please enter again!")

}while(n==0)

printf("please input record! \n")/*提示输入记录*/

printf("name|unit|telephone|product_company|designer|price|kucun|year|month|day\n")

printf("------------------------------------------------\n")

for(i=0i<ni++)

{

/*scanf("%s %s %s %s %s %s %s %s %s %s",t[i].name,t[i].units,t[i].tele,t[i].product_company,t[i].designer,t[i].price,t[i].kucun,t[i].year,t[i].month,t[i].day)*//*输入记录*/

printf("name:")/* 打印输出号码 */

scanf("%s",&t[i].name)/* 用数组输入号码 */

printf("unit:")/* 打印输出名字 */

scanf("%s",&t[i].units)/* 用数组输入姓名 */

printf("telephone:")/* 打印输出性别 */

scanf("%s",&t[i].tele)/* 用数组输入性别 */

printf("product_company:")/* 打印输出生日 */

scanf("%s",&t[i].product_company)/* 用数组输入生日 */

printf("designer:")/* 打印输出婚姻状况 */

scanf("%s",&t[i].designer)/* 用数组输入婚姻状况 */

printf("price:")/* 打印输出工作状况 */

scanf("%s",&t[i].price)/* 用数组输入工作状况 */

printf("kucun:")/* 打印输出工作状况 */

scanf("%s",&t[i].kucun)/* 用数组输入工作状况 */

printf("produce year:")/* 打印输出工作状况 */

scanf("%s",&t[i].year)/* 用数组输入工作状况 */

printf("produce month:")/* 打印输出工作状况 */

scanf("%s",&t[i].month)/* 用数组输入工作状况 */

printf("produce day:")/* 打印输出工作状况 */

scanf("%s",&t[i].day)/* 用数组输入工作状况 */

printf("-----------Ok!this record have been recorded!------------\n")

}

printf("the all have been recorded!\n")

getch()

clrscr()

return n/*返回记录条数*/

}

/*显示记录,参数为记录数组和记录条数*/

void list(ADDRESS t[],int n)

{

int i

clrscr()

printf("\n\n*******************ADDRESS******************\n")

printf("name|unit|telephone|product_company|designer|price|kucun|year|month|day\n")

printf("------------------------------------------------------------------------\n")

if(n!=0)

for(i=0i<ni++)

{

printf("%s/%s/%s/%s/%s/%s/%s/%s/%s/%s",t[i].name,t[i].units,t[i].tele,t[i].product_company,t[i].designer,t[i].price,t[i].kucun,t[i].year,t[i].month,t[i].day)

if((i+1)%10==0) /*判断输出是否达到10条记录*/

{

printf("Press any key continue...\n")/*提示信息*/

getch()/*压任意键继续*/

}

}

else printf("there is no record!\n")

printf("************************end*******************\n")

}

/*查找记录*/

void search(ADDRESS t[],int n)

{

char s[20]/*保存待查找姓名字符串*/

int i/*保存查找到结点的序号*/

/*clrscr()*/

printf("please input the search name:\n")

scanf("%s",s)/*输入待查找姓名*/

i=find(t,n,s)/*调用find函数,得到一个整数*/

if(i>n-1) /*如果整数i值大于n-1,说明没找到*/

printf("not found!\n")

else

print(t[i])/*找到,调用显示函数显示记录*/

clrscr()

}

/*显示指定的一条记录*/

void print(ADDRESS temp)

{

/* clrscr() */

printf("\n\n********************************************\n")

printf("name|unit|telephone|product_company|designer|price|kucun|year|month|day\n")

/*printf("------------------------------------------------\n")*/

printf("%s/%s/%s/%s/%s/%s/%s/%s/%s/%s",temp.name,temp.units,temp.tele,temp.product_company,temp.designer,temp.price,temp.kucun,temp.year,temp.month,temp.day)

printf("**********************end***********************\n")

}

/*查找函数,参数为记录数组和记录条数以及姓名s */

int find(ADDRESS t[],int n,char *s)

{

int i

for(i=0i<ni++)/*从第一条记录开始,直到最后一条*/

{

if(strcmp(s,t[i].name)==0) /*记录中的姓名和待比较的姓名是否相等*/

return i/*相等,则返回该记录的下标号,程序提前结结束*/

}

return i/*返回i值*/

}

/*删除函数,参数为记录数组和记录条数*/

int delete(ADDRESS t[],int n)

{

char s[20]/*要删除记录的姓名*/

int ch=0

int i,j

printf("please deleted name\n")/*提示信息*/

scanf("%s",s)/*输入姓名*/

i=find(t,n,s)/*调用find函数*/

if(i>n-1) /*如果i>n-1超过了数组的长度*/

printf("no found not deleted\n")/*显示没找到要删除的记录*/

else

{

print(t[i])/*调用输出函数显示该条记录信息*/

printf("Are you sure delete it(1/0)\n")/*确认是否要删除*/

scanf("%d",&ch)/*输入一个整数0或1*/

if(ch==1) /*如果确认删除整数为1*/

{

for(j=i+1j<nj++) /*删除该记录,实际后续记录前移*/

{

strcpy(t[j-1].name,t[j].name)/*将后一条记录的姓名拷贝到前一条*/

strcpy(t[j-1].units,t[j].units)/*将后一条记录的单位拷贝到前一条*/

strcpy(t[j-1].tele,t[j].tele)/*将后一条记录的电话拷贝到前一条*/

strcpy(t[j-1].product_company,t[j].product_company)

strcpy(t[j-1].designer,t[j].designer)

strcpy(t[j-1].price,t[j].price)

strcpy(t[j-1].kucun,t[j].kucun)

strcpy(t[j-1].year,t[j].year)

strcpy(t[j-1].month,t[j].month)

strcpy(t[j-1].day,t[j].day)

}

n--/*记录数减1*/

}

}

return n/*返回记录数*/

}

/*插入记录函数,参数为结构体数组和记录数*/

int add(ADDRESS t[],int n)/*插入函数,参数为结构体数组和记录数*/

{

ADDRESS temp/*新插入记录信息*/

int i,j

char s[20],p/*确定插入在哪个记录之前*/

printf("please input the new record:\n")

printf("************************************************\n")

printf("name|unit|telephone|product_company|designer|price|kucun|year|month|day\n")

/*printf("--------------------------------------------------\n")

scanf("%s%s%s",temp.name,temp.units,temp.tele)*//* 输入插入信息*/

printf("name:")/* 打印输出号码 */

scanf("%s",&temp.name)/* 用数组输入号码 */

printf("unit:")/* 打印输出名字 */

scanf("%s",&temp.units)/* 用数组输入姓名 */

printf("telephone:")/* 打印输出性别 */

scanf("%s",&temp.tele)/* 用数组输入性别 */

printf("product_company:")/* 打印输出生日 */

scanf("%s",&temp.product_company)/* 用数组输入生日 */

printf("designer:")/* 打印输出婚姻状况 */

scanf("%s",&temp.designer)/* 用数组输入婚姻状况 */

printf("price:")/* 打印输出工作状况 */

scanf("%s",&temp.price)/* 用数组输入工作状况 */

printf("kucun:")/* 打印输出工作状况 */

scanf("%s",&temp.kucun)/* 用数组输入工作状况 */

printf("produce year:")/* 打印输出工作状况 */

scanf("%s",&temp.year)/* 用数组输入工作状况 */

printf("produce month:")/* 打印输出工作状况 */

scanf("%s",&temp.month)/* 用数组输入工作状况 */

printf("produce day:")/* 打印输出工作状况 */

scanf("%s",&temp.day)/* 用数组输入工作状况 */

printf("-----------Ok!this record have been recorded!------------\n")

printf("------------------------------------------------\n")

K:printf("please input the wanted name's position to insert:\n")

scanf("%s",s)/*输入插入位置的姓名*/

i=find(t,n,s)/*调用find,确定插入位置*/

if(i>n-1) /*如果i>n-1超过了数组的长度*/

{

printf("the name isn't exist!\n")/*显示没找到要删除的记录*/

printf("Are you want to continue to insert?Yes--y/No--any other key!\n")

if(getch()=='y') goto K

}

else

{

for(j=n-1j>=ij--) /*从最后一个结点开始向后移动一条*/

{

strcpy(t[j+1].name,t[j].name)/*当前记录的姓名拷贝到后一条*/

strcpy(t[j+1].units,t[j].units)/*当前记录的单位拷贝到后一条*/

strcpy(t[j+1].tele,t[j].tele)/*当前记录的电话拷贝到后一条*/

strcpy(t[j+1].product_company,t[j].product_company)

strcpy(t[j+1].designer,t[j].designer)

strcpy(t[j+1].price,t[j].price)

strcpy(t[j+1].kucun,t[j].kucun)

strcpy(t[j+1].year,t[j].year)

strcpy(t[j+1].month,t[j].month)

strcpy(t[j+1].day,t[j].day)

}

strcpy(t[i].name,temp.name)/*将新插入记录的姓名拷贝到第i个位置*/

strcpy(t[i].units,temp.units)/*将新插入记录的单位拷贝到第i个位置*/

strcpy(t[i].tele,temp.tele)/*将新插入记录的电话拷贝到第i个位置*/

strcpy(t[i].product_company,temp.product_company)

strcpy(t[i].designer,temp.designer)

strcpy(t[i].price,temp.price)

strcpy(t[i].kucun,temp.kucun)

strcpy(t[i].year,temp.year)

strcpy(t[i].month,temp.month)

strcpy(t[i].day,temp.day)

n++/*记录数加1*/

return n/*返回记录数*/

}

}

/*保存函数,参数为结构体数组和记录数*/

void save(ADDRESS t[],int n)

{

int i

FILE *fp/*指向文件的指针*/

if((fp=fopen("record.txt","wb"))==NULL) /*打开文件,并判断打开是否正常*/

{

printf("can not open file\n")/*没打开*/

exit(1)/*退出*/

}

printf("\nSaving file now!\n")/*输出提示信息*/

fprintf(fp,"there is %d records!",n)/*将记录数写入文件*/

fprintf(fp,"\r\n")/*将换行符号写入文件*/

for(i=0i<ni++)

{

fprintf(fp,"%s/%s/%s/%s/%s/%s/%s/%s/%s/%s",t[i].name,t[i].units,t[i].tele,t[i].product_company,t[i].designer,t[i].price,t[i].kucun,t[i].year,t[i].month,t[i].day)/*格式写入记录*/

fprintf(fp,"\r\n")/*将换行符号写入文件*/

}

fclose(fp)/*关闭文件*/

printf("****save success***\n")/*显示保存成功*/

}

/*读入函数,参数为结构体数组*/

/* int load(ADDRESS t[]) */

/* { */

/* int i,n*/

/* FILE *fp*//*指向文件的指针*/

/* if((fp=fopen("record.txt","rb"))==NULL)*//* 打开文件*/

/*{ */

/*printf("can not open file\n")*//*不能打开*/

/*exit(1)*//*退出*/

/*} */

/* fscanf(fp,"%d",&n)*/ /*读入记录数*/

/* for(i=0i<ni++) */

/* fscanf(fp,"%20s%30s%10s",t[i].name,t[i].units,t[i].tele)*/ /*按格式读入记录*/

/* fclose(fp)*/ /*关闭文件*/

/* printf("You have success read data from file!!!\n")*//* 显示保存成功*/

/* return n*/ /*返回记录数*/

/* } */

/*按序号显示记录函数*/

int modify_kucun(ADDRESS t[],int n)

{

char s[20],ch[10]/*保存待查找姓名字符串*/

int i,j/*保存查找到结点的序号*/

/*clrscr()*/

printf("please input the cloth name which you wanted to modify its kucun:\n")

scanf("%s",s)/*输入待查找姓名*/

i=find(t,n,s)/*调用find函数,得到一个整数*/

if(i>n-1) /*如果整数i值大于n-1,说明没找到*/

printf("sorry!the name don't exist!\n")

else

{

print(t[i])/*找到,调用显示函数显示记录*/

/*printf("Are you sure to modify its kucun?Yes--y/")*/

printf("please input the new kucun you want:\n")

scanf("%c",ch)

for(j=0j<10j++)

t[i].kucun[j]=ch[j]

printf("Ok!the kucun has been modified!")

}

clrscr()

}

void display(ADDRESS t[])

{

int id,n

FILE *fp/*指向文件的指针*/

if((fp=fopen("record.txt","rb"))==NULL) /*打开文件*/

{

printf("can not open file\n")/*不能打开文件*/

exit(1)/*退出*/

}

printf("Enter order number:\n")/*显示信息*/

scanf("%d",&id)/*输入序号*/

fscanf(fp,"%d",&n)/*从文件读入记录数*/

if(id>=0&&id<n) /*判断序号是否在记录范围内*/

{

fseek(fp,(id-1)*sizeof(ADDRESS),1)/*移动文件指针到该记录位置*/

print(t[id])/*调用输出函数显示该记录*/

printf("\r\n")

}

else

printf("no %d number record!!!\n ",id)/*如果序号不合理显示信息*/

fclose(fp)/*关闭文件*/

}

/*排序函数,参数为结构体数组和记录数*/

void sort(ADDRESS t[],int n)

{

int i,j,flag

char y

ADDRESS temp/*临时变量做交换数据用*/

R: printf("Please select which kind to sort!0--sort by kucun/1--sort by Chu_Chang_Ri_Qi\n ")/*选择何种方式排序*/

if(getch()=='0')

{

for(i=0i<ni++)

{

flag=0/*设标志判断是否发生过交换*/

for(j=0j<n-1j++)

if((strcmp(t[j].kucun,t[j+1].kucun))>0) /*比较大小*/

{

flag=1

strcpy(temp.name,t[j].name)/*交换记录*/

strcpy(temp.units,t[j].units)

strcpy(temp.tele,t[j].tele)

strcpy(temp.product_company,t[j].product_company)

strcpy(temp.designer,t[j].designer)

strcpy(temp.price,t[j].price)

strcpy(temp.kucun,t[j].kucun)

strcpy(temp.year,t[j].year)

strcpy(temp.month,t[j].month)

strcpy(temp.day,t[j].day)

strcpy(t[j].name,t[j+1].name)

strcpy(t[j].units,t[j+1].units)

strcpy(t[j].tele,t[j+1].tele)

strcpy(t[j].product_company,t[j+1].product_company)

strcpy(t[j].designer,t[j+1].designer)

strcpy(t[j].price,t[j+1].price)

strcpy(t[j].kucun,t[j+1].kucun)

strcpy(t[j].year,t[j+1].year)

strcpy(t[j].month,t[j+1].month)

strcpy(t[j].day,t[j+1].day)

strcpy(t[j+1].name,temp.name)

strcpy(t[j+1].units,temp.units)

strcpy(t[j+1].tele,temp.tele)

strcpy(t[j+1].product_company,temp.product_company)

strcpy(t[j+1].designer,temp.designer)

strcpy(t[j+1].price,temp.price)

strcpy(t[j+1].kucun,temp.kucun)

strcpy(t[j+1].year,temp.year)

strcpy(t[j+1].month,temp.month)

strcpy(t[j+1].day,temp.day)

}

if(flag==0) break/*如果标志为0,说明没有发生过交换循环结束*/

}

printf("sort sucess!!!\n")/*显示排序成功*/

}

else

if(getch()=='1')

{

for(i=0i<ni++)

{

flag=0/*设标志判断是否发生过交换*/

for(j=0j<n-1j++)

/* if((()&&((strcmp(t[j].month,t[j+1].month))>0)))

&&((strcmp(t[j].day,t[j+1].day))>0))||

(((strcmp(t[j].year,t[j+1].year))=0)&&((strcmp(t[j].month,t[j+1].month))>0))||

(((strcmp(t[j].year,t[j+1].year))=0)&&((strcmp(t[j].month,t[j+1].month))=0)&&((strcmp(t[j].day,t[j+1].day))>0))) *//*比较大小*/

if(( ((strcmp(t[j].year,t[j+1].year))>0)&&((strcmp(t[j].month,t[j+1].month))>0)&&((strcmp(t[j].day,t[j+1].day))>0) )||

( ((strcmp(t[j].year,t[j+1].year))==0)&&((strcmp(t[j].month,t[j+1].month))>0) )||

( ((strcmp(t[j].year,t[j+1].year))==0)&&((strcmp(t[j].month,t[j+1].month))==0)&&((strcmp(t[j].day,t[j+1].day))>0) ))

{

flag=1

strcpy(temp.name,t[j].name)/*交换记录*/

/*#include <stdio.h>

void main(){

int i

int ix

int b[5]

int d[5]

printf("请输入1到5的两位数(中间空格隔开):")

for(i=0i<5i++){

for(ix=0ix<5ix++){

scanf("%d %d",&b[i],&d[ix])

if(i<=5,ix<=5&&b[i]!=d[ix]){

printf("%d%d %d%d",d[ix],b[i]&&b[i],d[ix])

}

}

}

}*/

A. 中山大学 财务管理专业 本科课程设置 比如大一 大二 大三 大四 分别学那些课程

中山大学---管理学院

---财务管理专业

---课程设计:

财务管理、公司财务、投资学、货币银行学、国际金融、商业银行经营管理、公共财政学、投资项目评估、国际财务管理、国际税收与税务筹划、中级财务会计。

---培养目标:

培养学生通晓会计核算方法,掌握财务分析原理,精通投融资理论,具备财务决策技能。

---就业方向:

培养各类企业、 *** 部门及银行、证券、保险等金融机构的财务核算与分析、投资决策与管理、理财规划及资本运营的专业人才。

B. 财务管理专业的课程设置是什么

财务管理不是会计,但必须以会计为基础,财务管理专业的课程主要有:

管理学原理版、微观经济学权、基础会计学、宏观经济学、营销学原理、财政学原理、商法、组织行为学、财务管理、概率论与数理统计、商业伦理、管理信息系统、财务会计、国际金融、投资学、货币银行学、公司财务、商业银行经营管理、期货、期权与其他衍生工具、国际财务管理、计量经济学、投资项目评估等。

C. 软件工程课程设计题目《家庭财务管理信息系统设计与开发》,要求完成一个桌面或b/s架构的学生综合信息

可以代为做,非无常哦。

D. 数据库课程设计:小型财务管理系统

!设+#设%我做过

!计+#计%我提供

!网+#软%我帮你

!站+#件%我有

E. C语言课设:个人财务管理软件 用C语言编辑(急求)

你好!

有个类似的程序,你看看吧,这是你的全部要求吗

F. C语言中,如何实现多文件程序注意事项主要有哪些(我在进行家庭财务管理系统的课程设计)

#include..