clt演算法
A. 求掃雷達人告訴我 minesweeper arbiter的計數里每行都是統計的什麼!!!
大概就是這個樣子:
RTime:
Real
Time(掃雷真實用時)
Est
RTime:
Estimated
Time(預計完成時間)
3BV:Bechtel's
Board
Benchmark
Value
(完成當前局所需最少左鍵點擊數)
3BV/s:
3BV
/
RTime
Zini:
(代表標雷掃法所需的最少點擊數,有多種演算法)
(@後的數為除以
RTime
後的值,下同)
H.Zini:
Human
Zini
(Zini
計算方法的其中一種)
Ops:
Opening(無數字區域的數量)
lsls;
Island(構成BV點的成片數字區域的數量)
Left:
(左鍵點擊數)
Right:
(右鍵點擊數)
Double:
(雙擊次數)
Cl:
Clicks(總點擊數)
IOE:Index
Of
Efficiency;
3BV
/
Cl
ThrP:
IOE
/
Corr
Corr:
Correctness(有效點擊比例)
ZNE:
Zini
/
Cl(類似於IOE)
HZNE:
H.Zini
/
Cl
ZNT:
Zini
/總有效點擊數
HZNT:
H.Zini
/
總有效點擊數
Path:
(以像素為單位的滑鼠移動路徑長度)
Flags:
(右鍵標記的雷數)
RQP:Rapport
Qualité
Prix;
(RTime+1)
/
3BV/s
IOS:
Index
of
Speed;
log
(3BV)
/
log
(Time
-
1)
Rank:(當前局在已完成游戲中的
RTime
和
3BV/s
排名)
(of
後的數為已完成的游戲數,最後一個數為相應的比例)
ios
rank:
(當前局在已完成游戲中的IOS排名)
rqp
rank:(當前局在已完成游戲中的RQP排名)
B. 任務欄無法打開
很明顯要不是中了病毒,要麼是某個軟體屏弊了.
C. 作為面試官,如何判斷一個面試者的深度學習水平
人工智慧、大數據、雲計算和物聯網是目前非常熱門而且前沿的領域,未來發展前景值得重視。不論是薪資待遇,還是人才缺口,都對程序員有很大的吸引力。那麼在面試深度學習高級工程師的時候,HR都看重哪些能力呢?
(1) 熟練的編程開發能力
對於深度學習高級工程師而言,掌握python編程語言是最基礎的能力。除此之外,還要至少掌握一門底層開發語言。畢竟公司招人不會只為了讓你訓練模型寫論文,有時候還要把模型部署到手機上,優化底層演算法等等,所以也要掌握C/C++等編程語言。
(2) 優秀的模型開發能力
深度學習技術具有很高的靈活性,特別是隨著許多流行的深度學習框架的出現,如Tensorflow,Keras,Caffe,MXnet,PyTorch,Theano等。這些工具大多以模塊化方式開發,並具有活躍的社區和專業的支持。
雖然深度學習的開源代碼很多,但是以學術研究模型為主,很少有企業會把產品線上優化過的核心模型放出來。所以優秀的模型開發能力,是必須要具備的。
為了讓同學們能用更短的時間掌握深度學習技能,中公教育聯合中科院自動化研究所專家,推出了人工智慧《深度學習》直播課程。課程時長5周,包含6大實戰項目,以實操貫穿理論,可以幫你快速建立、梳理相關知識體系,讓你的成長更有方向、更高效。
課程涵蓋行業內75%技術要點,如語音識別(微信語音轉文字、Siri、天貓精靈等)、圖像識別(火車站人臉識別、人臉打卡、辦卡人臉識別、健康碼人臉識別、違章拍攝、網路識圖、淘寶識圖、有聲繪本)、機器對話(微軟小冰、同聲翻譯等)都有所掌握,滿足各類就業需求。
D. 美標管件怎麼分類 具體點的
美國管件標准ASME/ANSI B16.9 工廠製造的無縫鋼管制對焊管件 ASME/ANSI B16.11 承插焊和螺紋鍛造管件 ASME/ANSI B16.28 鋼制對焊小半徑彎頭和回頭彎 ASME B16.5 管法蘭和法蘭配件 MSS SP-43 鍛制不銹鋼對焊管件 MSS SP-83 承插焊和螺紋活接頭MSS SP-97 承插焊、螺紋和對焊端的整體加強式管座 ASME B16.3-1998可鍛鑄鐵螺紋管
E. C#unchecked是怎麼用的
這是告訴系統,不檢查變數溢出。這里應該是針對你這++count的。
假如說,你這count是byte類型。
byte的有效范圍是從0到255。
你這樣一直累加。有可能就會到256,超出他的正常值。
使用unchecked時,255再加1就會變成0。
F. 華為DvcAN20
華為暢享 20 Pro
作為華為暢享20系列首款5G手機產品,該機擁有雙模6頻段5G性能,配6.5英寸90Hz刷新率屏幕,拍照有4800萬AI三攝。華為暢享 20 Pro在外觀方面,採用了2019年主流的水滴全面屏設計。眾所周知,在2020年,智能手機開始向挖孔全面屏設計普及。雖然水滴屏同樣可以帶來很高的屏佔比,但是和挖孔全面屏相比,美觀方面還是稍遜一籌。
(6)clt演算法擴展閱讀:
華為暢享 20 Pro在相機方面,採用了後置4800萬像素,支持夜景拍攝和800萬像素的超廣角、景深攝像頭以及200萬的微距攝像頭。雖然從相機方面來看,華為暢享 20 Pro的相機參數不算出色,但是從筆者對華為暢享 20 Pro的拍照體驗來看,華為暢享 20 Pro在光線充足的情況下,白平衡表現依舊出色。當然,在光線不足的情況下,由於華為影像系統的加持,進光量有了很大的提升,對於噪點和白平衡的控制同樣是可圈可點的。
G. C語言編寫酒店管理系統
int CheckRoom(struct room *pr)
{char phonenu[4][12]={"110","119","120","122"};/*非法私人電話號碼*/
char type[3][2]={"2","t","T"};
int flag=1,i;
static int pass=1;
if(NULL==pr) {printf("Error:Null point! Can't check the datas:\n");return 0;}
printf("Start to part Maintain:about room\n");
while( strlen(pr->roomnu)>5 )/*檢查數據長度,防止保存二進制數據錯誤*/
{pr->roomnu[5]=0;
printf("ERROR:the roomnu: %s is longer than 5 bytes.\n",pr->roomnu);
printf("Please select another shorter roomnu:\n");
scanf("%s",pr->roomnu);
}
while( strlen(pr->cleaner)>19 )/*檢查數據長度,防止保存二進制數據錯誤*/
{pr->cleaner[19]=0;
printf("ERROR:the cleaner:%s is longer than 19 bytes.\n",pr->cleaner);
printf("Please select another shorter name:\n");
scanf("%s",pr->cleaner);
}
while(flag||strlen(pr->phonenu)>11)/*檢查數據內容(由flag控制)和長度,防止保存二進制數據錯誤*/
{
while( strlen(pr->phonenu)>11 )/*檢查長度*/
{pr->phonenu[11]=0;
printf("ERROR:the phonenu:%s is longer than 11 bytes.\n",pr->phonenu);
printf("Please select another shorter phonenu:\n");
scanf("%s",pr->phonenu);
}
while(flag)/*檢查內容*//*這個演算法也有問題,如果內容非法,但長度通過怎麼辦呢?*/
{for(i=0;flag&&i<4;i++)
if( 0==strcmp(pr->phonenu,phonenu[i]) )/*內容非法*/
{printf("ERROR:illegal phonenu:%s!\n",pr->phonenu);
flag=0;/*檢測到內容非法*/
}
if(flag) flag=0;/*內容檢查通過*/
else {flag=1;
printf("Please input a legal phonenu:\n");
scanf("%s",pr->phonenu);/*內容檢查未通過,重新收入*/
}
}
}
flag=1;
while(flag||strlen(pr->type)>1)/*檢查數據內容(由flag控制)和長度,此例和上例不同*/
{
while( strlen(pr->type)>1 )/*檢查長度*/
{pr->type[1]=0;
printf("ERROR:the type:%s is longer than 1 byte.\n",pr->type);
printf("Please select another shorter type:\n");
scanf("%s",pr->type);
}
while(flag)/*檢查內容*/
{if(strcmp(pr->type,type[0])&&strcmp(pr->type,type[1])&&strcmp(pr->type,type[2]) )/*內容非法*/
{printf("ERROR:illegal type:%s!\n",pr->type);
flag=0;/*檢測到內容非法*/
}
if(flag) flag=0;/*內容檢查通過*/
else {flag=1;
printf("Please input a legal type:\n");
scanf("%s",pr->type);/*內容檢查未通過,重新收入*/
}
}
}
while( pr->maximum<pr->currentclient )/*檢查數據間的聯系*/
{printf("ERROR:the room's capacity does not fit for the number of current clients.\n");
printf("Please alter the maximum:\n");
scanf("%d",&(pr->maximum));
}/*檢查房間最大容量和當前已住顧客人數是否相容,如果前者小於後者則寫入錯誤報告文件 */
printf("Congratulations: ROOM Check pass %d!\n",pass++);
return 1;
}
int CheckClient(struct client *pc)
{ int flag=1,i;
char sex[4][2]={"m","M","f","F"};
static int pass=1;
if(NULL==pc) {printf("Error:Null point! Can't check the datas:\n");return 0;}
printf("Start to part Maintain:about client\n");
while( strlen(pc->roomnu)>5 )/*檢查房間長度*/
{pc->roomnu[5]=0;
printf("ERROR:the roomnu: %s is longer than 5 bytes.\n",pc->roomnu);
printf("Please select another shorter roomnu:\n");
scanf("%s",pc->roomnu);
}
while( strlen(pc->identity_card)!=18 )/*檢查身份證號長度*/
{pc->identity_card[18]=0;
printf("ERROR:the identity_card:%s is not 18 bytes.\n",pc->identity_card);
printf("Please check the length and input it again:\n");
scanf("%s",pc->identity_card);
}
while(strlen(pc->name)>19)/*檢查姓名長度*/
{pc->name[19]=0;
printf("ERROR:the name:%s is longer than 19 bytes.\n",pc->name);
printf("Please select another shorter phonenu:\n");
scanf("%s",pc->name);
}
while(flag||strlen(pc->sex)>1)/*檢查性別內容(由flag控制)和長度*/
{
while( strlen(pc->sex)>1 )/*檢查長度*/
{pc->sex[1]=0;
printf("ERROR:the sex:%s is longer than 1 byte.\n",pc->sex);
printf("Please select another shorter sex:\n");
scanf("%s",pc->sex);
}
while(flag)/*檢查內容*/
{if(strcmp(pc->sex,sex[0])&&strcmp(pc->sex,sex[1])&&strcmp(pc->sex,sex[2])&&strcmp(pc->sex,sex[3]) )/*內容非法*/
{printf("ERROR:illegal sex:%s!\n",pc->sex);
flag=0;/*檢測到內容非法*/
}
if(flag) flag=0;/*內容檢查通過*/
else {flag=1;
printf("Please input a legal sex:\n");
scanf("%s",pc->sex);/*內容檢查未通過,重新收入*/
}
}
}
while( strlen(pc->date)!=8 )/*檢查日期長度*/
{pc->date[8]=0;
printf("ERROR:the date:%s is not 8 bytes.\n",pc->date);
printf("Please check the length and input it again:\n");
scanf("%s",pc->date);
}
while( strlen(pc->collect)>5 )/*檢查收款人長度*/
{pc->collect[5]=0;
printf("ERROR:the collect:%s is not 5 bytes.\n",pc->collect);
printf("Please check the length and input it again:\n");
scanf("%s",pc->collect);
}
while(pc->time<0)/*檢查入住天數*/
{printf("ERROR:illegal input of time: %f!\n",pc->time);
printf("Please check and input it again:\n");
scanf("%f",&pc->time);
}
while(pc->cost<0)/*檢查應繳費用*/
{printf("ERROR:illegal input of cost: %f!\n",pc->cost);
printf("Please check and input it again:\n");
scanf("%f",&pc->cost);
}
while(pc->fee<0)/*檢查實繳費用*/
{printf("ERROR:illegal input of cost: %f!\n",pc->fee);
printf("Please check and input it again:\n");
scanf("%f",&pc->fee);
}
if( pc->fee>pc->cost )/*檢查數據間的聯系,實繳費用應小於應繳用*/
{printf("It may be a error:fee=%f > cost=%f\n",pc->fee,pc->cost);
printf("Do you like to alter them?(1:YES;0:NO)\n");
scanf("%d",&flag);
while(flag)
{printf("Please input the values:cost and fee\n");
scanf("%f%f",&pc->cost,&pc->fee);
if(pc->fee>pc->cost)
{printf("Error again!!\n");flag=1;}
else flag=0;
}
}
printf("Congratulations: CLIENT Check pass %d!\n",pass++);
return 1;
}
int CheckAll(struct room *head_room)
{struct client *pc;
struct room *pr;
if(NULL==head_room) {printf("head_room=0\n");return 0;}
printf("Start to part Maintain:about room and client\n");
pr=head_room;
while(pr)
{CheckRoom(pr);
pc=pr->head;
while(pc)
{CheckClient(pc);
pc=pc->next;
}
pr=pr->next;
}
return 1;
}
/**該函數為內部數據維護,不提供輸入數據服務。實體完整性,參照完整性,用戶自定義完整性
出現錯誤則將錯誤輸出到doc文檔。
錯誤范圍暫時定義如下:
1.同一房間的客戶房間號不同(同房搜索!)
2.實繳費用大於應繳費用。(同房搜索!)
3.同一個客戶在同一天兩次住進賓館(全表搜索!身份證號和入住日期相同)
4.同一身份證號,姓名和性別不同(全表搜索!)
另外,應該完成的任務有:
5.計算客戶的應繳費用->對cost操作,需要用到:time,unit_price
6.計算客房的總住戶人數(包括當前住戶)->對totalclient操作,需要用到:沒有
7.重新修訂當前住戶數->對currentclient進行操作,需要用到:time
8.計算客房的總計收入->對income進行操作,需要用到:fee
9.當前住戶的實繳費用清零->對fee進行操作,需要用到:time
完成這些操作的先後順序為:7->6->5->9->8->2->1->3->4*/
int Consistency(struct room *head_room)
{struct room *pr,*tpr;
struct client *pc,*tpc;
char file[12]="error.doc";
int i=0;/*i用於錯誤計數*/
static int count=0;
FILE *fp;
if(NULL==head_room) {printf("head_room=0\n");return 0;}
printf("Start to part Maintain:Consistency!\n");
pr=head_room;
while(pr)
{pr->currentclient=0;
/*pr->totalclient=0;*/
pr->income=0;
pc=pr->head;
while(pc)
{if(!pc->time) pr->currentclient++;/*完成........7.....*/
/*pr->totalclient++;*/ /*完成........6.....*/
pc->cost=(pc->time)*(pr->unit_price); /*完成........5.....*/
if(!pc->time) pc->fee=0; /*完成........9.....*/
pr->income=pr->income+pc->fee; /*完成........8.....*/
pc=pc->next;
}
pr=pr->next;
}
if(NULL==( fp=fopen(file,"wt") ) )
{printf("Cannot open file:%s!\n",file);
return 0;
}
pr=head_room;
while(pr)
{pc=pr->head;
while(pc)
{if(pc->fee>pc->cost)
{fprintf(fp,"Error %d:fee=%f > cost=%f\n",++i,pc->fee,pc->cost);
fprintf(fp,"roomnu identity_card name sex date clt time cost fee\n");
fprintf(fp,"%-6s %-18s %-15s %-3s %-8s %-3s %-4.1f %-5.1f %-5.1f\n\n",pc->roomnu,pc->identity_card,pc->name,pc->sex,pc->date,pc->collect,pc->time,pc->cost,pc->fee);
/*完成........2.....*/
}
if( strcmp(pr->roomnu,pc->roomnu) )
{fprintf(fp,"Error %d:the client's roomnu:%s != the room's roomnu:%s",++i,pc->roomnu,pr->roomnu);
fprintf(fp,"roomnu cleaner phonenu type max area price clientNO\n");
fprintf(fp,"%-6s %-16s %-12s %-4s %-3d %-6.1f %-6.1f %-2d\n",pr->roomnu,pr->cleaner,pr->phonenu,pr->type,pr->maximum,pr->area,pr->unit_price,pr->currentclient);
fprintf(fp,"roomnu identity_card name sex date clt time cost fee\n");
fprintf(fp,"%-6s %-18s %-15s %-3s %-8s %-3s %-4.1f %-5.1f %-5.1f\n\n",pc->roomnu,pc->identity_card,pc->name,pc->sex,pc->date,pc->collect,pc->time,pc->cost,pc->fee);
/*完成........1.....*/
}
pc=pc->next;
}
pr=pr->next;
}
/*這個要全表搜索,搜索一次全表過掉一個客戶*/
pr=head_room;
while(pr)
{pc=pr->head;
while(pc)
{
if(pc->next)
{tpc=pc->next;
while(tpc)
{if(0==strcmp(pc->identity_card,tpc->identity_card) && 0==strcmp(pc->date,tpc->date) )
{fprintf(fp,"Error %d:the same client:%s lived in our hotel in the same day:%s\n",++i,pc->identity_card,pc->date);
fprintf(fp,"roomnu identity_card name sex date clt time cost fee\n");
fprintf(fp,"%-6s %-18s %-15s %-3s %-8s %-3s %-4.1f %-5.1f %-5.1f\n",pc->roomnu,pc->identity_card,pc->name,pc->sex,pc->date,pc->collect,pc->time,pc->cost,pc->fee);
fprintf(fp,"%-6s %-18s %-15s %-3s %-8s %-3s %-4.1f %-5.1f %-5.1f\n\n",tpc->roomnu,tpc->identity_card,tpc->name,tpc->sex,tpc->date,tpc->collect,tpc->time,tpc->cost,tpc->fee);
}/*完成........3.....*/
if(0==strcmp(pc->identity_card,tpc->identity_card) && (strcmp(pc->name,tpc->name)||strcmp(pc->sex,tpc->sex)) )
{fprintf(fp,"Error %d:the same client:%s have the different name or sex in our hotel.\n",++i,pc->identity_card);
fprintf(fp,"roomnu identity_card name sex date clt time cost fee\n");
fprintf(fp,"%-6s %-18s %-15s %-3s %-8s %-3s %-4.1f %-5.1f %-5.1f\n",pc->roomnu,pc->identity_card,pc->name,pc->sex,pc->date,pc->collect,pc->time,pc->cost,pc->fee);
fprintf(fp,"%-6s %-18s %-15s %-3s %-8s %-3s %-4.1f %-5.1f %-5.1f\n\n",tpc->roomnu,tpc->identity_card,tpc->name,tpc->sex,tpc->date,tpc->collect,tpc->time,tpc->cost,tpc->fee);
}/*完成........4.....*/
tpc=tpc->next;
}/*while(tpc) exit */
/*當前房間比較結束,進入下一個房間*/
tpr=pr->next;
while(tpr)
{tpc=tpr->head;
while(tpc)
{if(0==strcmp(pc->identity_card,tpc->identity_card) && 0==strcmp(pc->date,tpc->date) )
{fprintf(fp,"Error %d:the same client:%s lived in our hotel in the same day:%s\n",++i,pc->identity_card,pc->date);
fprintf(fp,"roomnu identity_card name sex date clt time cost fee\n");
fprintf(fp,"%-6s %-18s %-15s %-3s %-8s %-3s %-4.1f %-5.1f %-5.1f\n",pc->roomnu,pc->identity_card,pc->name,pc->sex,pc->date,pc->collect,pc->time,pc->cost,pc->fee);
fprintf(fp,"%-6s %-18s %-15s %-3s %-8s %-3s %-4.1f %-5.1f %-5.1f\n\n",tpc->roomnu,tpc->identity_card,tpc->name,tpc->sex,tpc->date,tpc->collect,tpc->time,tpc->cost,tpc->fee);
}/*完成........3.....*/
if(0==strcmp(pc->identity_card,tpc->identity_card) && (strcmp(pc->name,tpc->name)||strcmp(pc->sex,tpc->sex)) )
{fprintf(fp,"Error %d:the same client:%s have the different name or sex in our hotel.\n",++i,pc->identity_card);
fprintf(fp,"roomnu identity_card name sex date clt time cost fee\n");
fprintf(fp,"%-6s %-18s %-15s %-3s %-8s %-3s %-4.1f %-5.1f %-5.1f\n",pc->roomnu,pc->identity_card,pc->name,pc->sex,pc->date,pc->collect,pc->time,pc->cost,pc->fee);
fprintf(fp,"%-6s %-18s %-15s %-3s %-8s %-3s %-4.1f %-5.1f %-5.1f\n\n",tpc->roomnu,tpc->identity_card,tpc->name,tpc->sex,tpc->date,tpc->collect,tpc->time,tpc->cost,tpc->fee);
}/*完成........4.....*/
tpc=tpc->next;
}/*while(tpc) exit */
tpr=tpr->next;
}/*while(tpr) exit */
}
else/*當前客戶下一節點為空的情況搜索*/
{tpr=pr->next;
while(tpr)
{tpc=tpr->head;
while(tpc)
{if(0==strcmp(pc->identity_card,tpc->identity_card) && 0==strcmp(pc->date,tpc->date) )
{fprintf(fp,"Error %d:the same client:%s lived in our hotel in the same day:%s\n",++i,pc->identity_card,pc->date);
fprintf(fp,"roomnu identity_card name sex date clt time cost fee\n");
fprintf(fp,"%-6s %-18s %-15s %-3s %-8s %-3s %-4.1f %-5.1f %-5.1f\n",pc->roomnu,pc->identity_card,pc->name,pc->sex,pc->date,pc->collect,pc->time,pc->cost,pc->fee);
fprintf(fp,"%-6s %-18s %-15s %-3s %-8s %-3s %-4.1f %-5.1f %-5.1f\n\n",tpc->roomnu,tpc->identity_card,tpc->name,tpc->sex,tpc->date,tpc->collect,tpc->time,tpc->cost,tpc->fee);
}/*完成........3.....*/
if(0==strcmp(pc->identity_card,tpc->identity_card) && (strcmp(pc->name,tpc->name)||strcmp(pc->sex,tpc->sex)) )
{fprintf(fp,"Error %d:the same client:%s have the different name or sex in our hotel.\n",++i,pc->identity_card);
fprintf(fp,"roomnu identity_card name sex date clt time cost fee\n");
fprintf(fp,"%-6s %-18s %-15s %-3s %-8s %-3s %-4.1f %-5.1f %-5.1f\n",pc->roomnu,pc->identity_card,pc->name,pc->sex,pc->date,pc->collect,pc->time,pc->cost,pc->fee);
fprintf(fp,"%-6s %-18s %-15s %-3s %-8s %-3s %-4.1f %-5.1f %-5.1f\n\n",tpc->roomnu,tpc->identity_card,tpc->name,tpc->sex,tpc->date,tpc->collect,tpc->time,tpc->cost,tpc->fee);
}/*完成........4.....*/
tpc=tpc->next;
}/*while(tpc) exit */
tpr=tpr->next;
}/*while(tpr) exit */
}
pc=pc->next;/*搜索一次全表過掉一個客戶*/
}/*while(pc) exit */
pr=pr->next;
}/*while(pr) exit */
printf("Maintain NO. %d\n",++count);
fclose(fp);
return 1;
}
int ToDate(char *date,int year,int month,int day)/*將年月日轉換為字元串*/
{int i,j;
char temp[9];
for(i=3;i>-1;i--)
{j=year%10;
temp[i]=j+'0';
year=year/10;
}
for(i=1;i>-1;i--)
{j=month%10;
temp[4+i]=j+'0';
month=month/10;
}
for(i=1;i>-1;i--)
{j=day%10;
temp[6+i]=j+'0';
day=day/10;
}
temp[8]=0;
strcpy(date,temp);
return 1;
}
int Account(struct room *head_room)
{struct room *pr;
struct client *pc;
char temp[20],date[9],name[6];
float cost,fee;
int time,year,month,day;
int flag=1;
clr();
if(NULL==head_room) {printf("head_room=0\n");getch();clr();return 0;}
printf("Please input CLIENT ID(18bytes)!\n");/*mode=1表示根據身份證號查找特定客戶*/
scanf("%s",temp);
while(strlen(temp)!=18)
{printf("Error:the client(ID=%s) is not 18 bytes!",temp);
printf("Please check and input CLIENT ID(18bytes),again!\n");/*mode=1表示根據身份證號查找特定客戶*/
scanf("%s",temp);
}
/*查找客戶*/
pr=head_room;
flag=1;
while(flag&&pr)
{pc=pr->head;
while(flag&&pc)
{if( !strcmp(pc->identity_card,temp)&&!pc->time)
{printf("roomnu identity_card name sex date clt time cost fee\n");
PrintClient(pc);
flag=0;
}
if(flag) pc=pc->next;
}
pr=pr->next;
}
if(NULL==pc) {printf("Error:the client(ID=%s) does not exist in out hotel!\n",temp);getch();clr();return 0;}
/*獲取日期*/
year =GetTime(0,1);
month=GetTime(0,2);
day =GetTime(0,3);
ToDate(date,year,month,day);
time=CountDays(pc->date,date);
cost=time*pr->unit_price;
printf("The client ID=%s who have lived %d days should pay %6.1f $!\n",temp,time,cost);
printf("Please input how much you get from him and your name!\n");
printf("The money is:");
scanf("%f",&fee);
printf("Your name(collect) is:");
scanf("%s",name);
while(strlen(name)>5)
{printf("Error:the name=%s is longer than 5 bytes!",name);
printf("Please check and input ,again!\n");/*mode=1表示根據身份證號查找特定客戶*/
scanf("%s",name);
}
pc->fee=fee;
pc->cost=cost;
pc->time=time;
strcpy(pc->collect,name);
printf("Account end! Thank you!\n");
return 1;
}