91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 189KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-06-03
  • 語言: C/C++
  • 標(biāo)簽:

資源簡介

一、具體任務(wù)題目: 個人賬簿管理系統(tǒng)設(shè)計 功能: 個人賬簿管理系統(tǒng)記錄某人每月的全部收入及各項開支情況,包括食品消費,房租,子女教育費用,水電費,醫(yī)療費,儲蓄等。 進入系統(tǒng)后可以輸入和修改某月的收支情況,可以對每月的開支從小到大進行排序,可以根據(jù)輸入的月份查詢每月的收支情況。 分步實施: 1. 初步完成總體設(shè)計,搭好框架,確定人機對話的界面,確定函數(shù)個數(shù); 2. 完成最低要求:建立一個文件,包括某人5個月的收支情況,能對文件中的信息進行擴充(追加),修改和刪除; 3. 進一步要求:完成對每月的開支排序,以及完成系統(tǒng)查詢功能。有興趣的同學(xué)可以自己擴充系統(tǒng)功能。 部分代碼: typedef struct { int month;//月份 int spxf;//食品消費 int fzfy;//房租費用 int znjy;//子女教育費用 int sdfy;//水電費用 int ylfy;//醫(yī)療費用 int cxfy;//儲蓄費用 int srfy;//收入費用 } Infor;

資源截圖

代碼片段和文件信息

#include?“l(fā)inklist.h“
#include?“calculate.h“

int?check(linkList?Lint?e)
{
LNode?*p1*p2;
p1=L;
p2=p1->next?;
while(p2!=NULL&&p2->data.month {
p1=p2;p2=p2->next;?
}
if(p2==NULL)return?0;
if(p2->data.month==e){
printf(“已經(jīng)存在的記錄...可選擇修改項更改記錄...\n“);
return?1;
}
else?return?0;
}

void?Insert(linkList?&LElemType?e)
{?
LNode?*p1*p2*p;
p1=L;
p2=p1->next?;
while(p2!=NULL&&p2->data.month {
p1=p2;p2=p2->next;?
}
p=(linkList)malloc(sizeof(LNode));//申請新結(jié)點
p->data.month=e.month;
p->data.food=e.food;
p->data.house=e.house;
p->data.edu=e.edu;
p->data.med=e.med;
p->data.save=e.save;
p->data.wt_elc=e.wt_elc;
p->data.outcome=e.outcome;
p1->next=p;
p->next=p2;
}

void?FillList(linkList?LSqList?&S)
{
LNode?*p;
p=L->next;
int?ik=1;
for(i=1;i<13;++i)
{
S.r[i].outcome=0;
S.r[i].month=0;
}
for(pi=1;p!=NULL;p=p->nexti++)
{
S.r[i].outcome=p->data.outcome;
S.r[i].month=p->data.month;
}
printf(“排序前:\n“);
for(i=1;i<13;i++)
{
if(S.r[i].month!=0)printf(“第%d月支出:%d\n“S.r[i].monthS.r[i].outcome);
}
BubbleSort(S);
printf(“\n\n排序后的結(jié)果為:\n“);
for(i=1;i<13;i++)
{
if(S.r[i].month!=0)printf(“No.%d:??第%d月支出:%d\n“k++S.r[i].monthS.r[i].outcome);
}
}

void?BubbleSort(SqList?&a)//冒泡排序
{
keytype?temp;
for?(int?i=1;i<=11;i++)
{
for?(int?j=1;j<13-i-1;j++)
{
if(a.r[j].outcome>a.r[j+1].outcome)
{
temp.month=a.r[j].month;temp.outcome=a.r[j].outcome;
a.r[j].month=a.r[j+1].month;a.r[j].outcome=a.r[j+1].outcome;
a.r[j+1].month=temp.month;a.r[j+1].outcome=temp.outcome;
}
}
}
}


LNode*?Find(linkList?L)
{?
????LNode?*p;
int?select;
????printf(“請輸入需要查找的月份:\n“);
p=L->next?;
scanf(“%d“&select);
while(p&&p->data.month!=select)
p=p->next;
return?p;
}

void?Change(linkList?&L)
{??
???LNode?*p*q;
???int?nm;
???p=Find(L);
???if?(p==NULL)
{
printf(“未找到相應(yīng)的記錄!\n“);
return;
}
???q=L;
???while?(q!=NULL?&&?q->next!=p)
???{
???q=q->next;
???}
???q=q->next;
???printf(“請選擇需要修改的子項目:\n1-食品2-房租3-子女教育4-水電5-醫(yī)療6-儲蓄\n“);
???scanf(“%d“&n);
???printf(“修改為...\n“);
???scanf(“%d“&m);
???switch(n){
???case?1:q->data.food=m;break;
???case?2:q->data.house=m;break;
???case?3:q->data.edu=m;break;
???case?4:q->data.wt_elc=m;break;
???case?5:q->data.med=m;break;
???case?6:q->data.save=m;break;
???}
???q->data.outcome=q->data.food+q->data.house+q->data.edu+q->data.med+q->data.wt_elc;
???printf(“修改后:“);
???printf(“\n??????食品?房租?教育?水電?醫(yī)療?儲蓄\n“);
???printf(“%2d月:%5d%5d%5d%5d%5d%5d??總支出:?%d\n“p->data.monthp->data.foodp->data.housep->data.edup->data.wt_elcp->data.medp->data.savep->data.outcome);
???printf(“-----------------------------------------------------\n“);
}


void?save(linkList?L)
{
printf(“\n“);
printf(“正在保存賬戶記錄表,請稍后...\n\n\n“);
int?i=0;FILE?*fp;
fp=fopen(“count.txt““w“);
LNode?*p=L->next;
fprintf(fp“??????食品?房租?教育?水電?

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2012-01-04?22:06??個人帳簿管理系統(tǒng)設(shè)計\
?????文件????????3479??2011-12-15?20:40??個人帳簿管理系統(tǒng)設(shè)計\Calculate.cpp
?????文件?????????598??2011-12-15?20:40??個人帳簿管理系統(tǒng)設(shè)計\calculate.h
?????文件?????????347??2011-12-15?20:40??個人帳簿管理系統(tǒng)設(shè)計\count.txt
?????目錄???????????0??2012-01-04?22:03??個人帳簿管理系統(tǒng)設(shè)計\Debug\
?????文件???????12892??2011-12-15?20:40??個人帳簿管理系統(tǒng)設(shè)計\Debug\Calculate.obj
?????文件??????204885??2011-12-15?20:40??個人帳簿管理系統(tǒng)設(shè)計\Debug\exp1.exe
?????文件??????248152??2011-12-15?20:40??個人帳簿管理系統(tǒng)設(shè)計\Debug\exp1.ilk
?????文件????????5227??2011-12-15?20:40??個人帳簿管理系統(tǒng)設(shè)計\Debug\linklist.obj
?????文件????????7726??2011-12-15?20:40??個人帳簿管理系統(tǒng)設(shè)計\Debug\main.obj
?????文件???????13588??2012-01-04?22:03??個人帳簿管理系統(tǒng)設(shè)計\Debug\menu.obj
?????文件??????232380??2012-01-04?21:55??個人帳簿管理系統(tǒng)設(shè)計\Debug\menu.pch
?????文件???????25600??2012-01-04?22:03??個人帳簿管理系統(tǒng)設(shè)計\Debug\menu.pdb
?????文件???????58368??2012-01-04?22:03??個人帳簿管理系統(tǒng)設(shè)計\Debug\vc60.idb
?????文件???????53248??2012-01-04?21:55??個人帳簿管理系統(tǒng)設(shè)計\Debug\vc60.pdb
?????文件????????4573??2011-12-15?20:40??個人帳簿管理系統(tǒng)設(shè)計\exp1.dsp
?????文件?????????514??2011-12-15?20:40??個人帳簿管理系統(tǒng)設(shè)計\exp1.dsw
?????文件???????35840??2011-12-30?10:28??個人帳簿管理系統(tǒng)設(shè)計\exp1.ncb
?????文件???????49664??2011-12-15?20:40??個人帳簿管理系統(tǒng)設(shè)計\exp1.opt
?????文件????????1371??2011-12-15?20:40??個人帳簿管理系統(tǒng)設(shè)計\exp1.plg
?????文件????????1142??2011-12-15?20:40??個人帳簿管理系統(tǒng)設(shè)計\linklist.cpp
?????文件????????1119??2011-12-15?20:40??個人帳簿管理系統(tǒng)設(shè)計\linklist.h
?????文件????????1605??2011-12-15?20:40??個人帳簿管理系統(tǒng)設(shè)計\main.cpp
?????文件????????1936??2011-12-15?20:40??個人帳簿管理系統(tǒng)設(shè)計\menu.cpp
?????文件????????3377??2012-01-04?22:03??個人帳簿管理系統(tǒng)設(shè)計\menu.dsp
?????文件?????????516??2012-01-04?22:06??個人帳簿管理系統(tǒng)設(shè)計\menu.dsw
?????文件???????33792??2012-01-04?22:06??個人帳簿管理系統(tǒng)設(shè)計\menu.ncb
?????文件???????49664??2012-01-04?22:06??個人帳簿管理系統(tǒng)設(shè)計\menu.opt
?????文件?????????888??2012-01-04?22:03??個人帳簿管理系統(tǒng)設(shè)計\menu.plg

評論

共有 條評論

相關(guān)資源