大一時的c語言程式設計的課設,當時上課沒怎麼聽,在網路和同學的幫助下完成的,現在看來**不足很多,貼在這留個紀念吧。主要實現功能就是對交通罰單(乙個txt檔案)的增刪查改,交通罰單的txt檔案需要自己準備放在工程目錄下。
#define num 100
#define test 28
#include
#include
#include
#include
#include
typedef
struct
traffic;
void
output
(traffic traflist,
int i)
;void
testcreat
(traffic traflist,
int n)
;int
menu_select()
;void
display_main_menu()
;int
input
(traffic traflist,
int n)
;void
display
(traffic traflist,
int n)
;int
delete_a_record
(traffic traflist,
int n)
;int
delete
(traffic traflist,
int n,
char
*name)
;void
sort_by_name
(traffic traflist,
int n)
;int
insert
(traffic traflist,
int n,traffic *s)
;int
insert_a_record
(traffic traflist,
int n)
;int
query
(traffic traflist,
int n,
char
*name)
;void
query_a_record
(traffic traflist,
int n)
;void
writetotext
(traffic traflist,
int n,
char
*filename)
;int
addfromtext
(traffic traflist,
int n,
char
*filename)
;main()
}}void
output
(traffic traflist,
int i)
intmenu_select()
while
(c>
'8'||c<
'0')
;return
(c-'0');
}void
display_main_menu()
intinput
(traffic traflist,
int n)
return n;
}void
display
(traffic traflist,
int n)};
}/*void testcreat(traffic traflist,int n)
intdelete
(traffic traflist,
int n,
char
*name)
if(i==n)
for(j=i;j)printf
("刪除成功!");
return n-1;
}void
sort_by_name
(traffic traflist,
int n)}}
/*for(i=0;i/*
for(i=0;iprintf
("排序完成!\n");
}int
insert_a_record
(traffic traflist,
int n)
intinsert
(traffic traflist,
int n,traffic *s)
/* int i,j,k;
traffic t;
for(i=1;i=0);j++);
for(k=i;k>j;k--)
traflist[k]=traflist[k-1];
traflist[j]=t;
}*/return n;
}void
query_a_record
(traffic traflist,
int n)
intquery
(traffic traflist,
int n,
char
*name)
}printf
("查無此人!\n");
return-1
;}void
writetotext
(traffic traflist,
int n,
char
*filename)
for(i=
0;i)fclose
(fp);}
intaddfromtext
(traffic traflist,
int n,
char
*filename)
fscanf
(fp,
"%d"
,&n)
;for
(i=0
;feof
(fp)==0
;i++
)return n;
}
C語言程式設計交通處罰單管理系統
注意 資訊儲存在txt文件中。程式功能 1.資訊錄入 2.資訊新增 3.資訊查詢 4.資訊修改 5.資訊刪除 6.資訊排序 7.資訊瀏覽 程式執行截圖 前面主函式 include include include pragma warning disable 4996 define crt secur...
hoolilaw案例分析 美國交通罰單處理八大誤區
外州的罰單是否需要處理?什麼才能算是超速合理的理由?罰單丟了怎麼辦?各位準司機 新司機 老司機,無論你的車技多酷炫 駕齡有多長,人在美帝開車,難免遇到罰單難題。安全駕駛,從破解罰單八大誤區開始。誤區一 罰單上簽字就等於認罪?正解 別想太多,罰單上簽字只是意味著確認收到了罰單 有些小夥伴抱著僥倖心理 ...
交通燈管理系統
銀行業務排程系統模擬銀行排程系統邏輯。需求 銀行內有6個業務視窗,1 4為普通視窗,5為快速視窗,6為vip視窗。有三種型別客戶 vip客戶,快速客戶 交水電費類業務 普通客戶。一部隨機生成各種型別的客戶,概率比例為 vip客戶 快速客戶 普通客戶 1 3 6。客戶辦理用時設定最少時間。各型別客戶在...