freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

簡(jiǎn)易股票投資管理系統(tǒng)說(shuō)明-文庫(kù)吧資料

2025-04-15 05:21本頁(yè)面
  

【正文】 id manager_main(struct CLUB clubs[]){ char choice。 default: printf(無(wú)效的選項(xiàng)\n)。 view_info(stock)。339。 //副程式:進(jìn)入使用者功能選項(xiàng) break。: user_id=user_exam(clubs)。 case 39。 //呼叫副程式manager_main } else { printf(密碼輸入錯(cuò)誤!!!!請(qǐng)輸入正確密碼\n)。pwd)。 fflush(stdin)。139。choice)。 printf(請(qǐng)選擇)。 printf(請(qǐng)選擇登入身分 )。 printf( 歡迎使用簡(jiǎn)易個(gè)人股票管理系統(tǒng) )。 printf(=========================================================)。 exit(1)。 //關(guān)閉讀檔 /*************open club file****************************/ if(club_file=fopen(,r)) { load_club(clubs,club_file)。 //無(wú)法開(kāi)啟,程式終結(jié) exit(1)。 //輸入選項(xiàng)用_user_id /*************open stock file****************************/ if(stock_file = fopen(, r)) { load_stock(stock,stock_file)。 //主選單之選項(xiàng) int pwd。 struct CLUB clubs[CLUB_NUM+1]。 struct PORTFOLIO my_pfo[PFO_NUM+1]。 FILE *club_file。 //紀(jì)錄手中持有投資組合的種類(lèi)int rec_trade。/******************************Glbal Variables*****************************/int profit_real。char Pause()。void save_portfolio(struct PORTFOLIO my_pfo[],int index)。void print_trade(struct REPORT trade[])。void print_stock(struct STOCKINFO stock[])。int search_pfo(struct PORTFOLIO my_pfo[],int choice)。int search_stock(struct STOCKINFO stock[],int choice)。int load_pfo(struct PORTFOLIO my_pfo[],FILE *fp)。void load_stock(struct STOCKINFO stock[],FILE *fp)。void trade_buy(struct STOCKINFO stock[],struct PORTFOLIO my_pfo[],struct REPORT trade[])。int user_exam(struct CLUB clubs[])。 }。 char name[80]。 }。 int mount_sell。 int mount_buy。struct REPORT { int code。 float price_buy[50]。 float price_avg。 char name[80]。 }。 int ratio。 float equity。 char name[80]。) //若不是按下Enter,而按下其他鍵,則傳回該鍵 { return c。 while(c!=39。 scanf(%c,amp。程式功能:按下Enter繼續(xù)程式碼:char Pause(){ char c。 //(現(xiàn)價(jià)平均價(jià))*張數(shù)*1000 } return temp_sum。 i=rec_pfo 。 int temp_sum=0。 fclose(pfo_file)。 } fprintf(pfo_file,%d\n,profit_real)。j++) { fprintf(pfo_file,%.2f ,my_pfo[i].price_buy[j])。 //儲(chǔ)存現(xiàn)價(jià) for(j=1。 //儲(chǔ)存張數(shù) fprintf(pfo_file,%f\t,my_pfo[i].price_avg)。 //儲(chǔ)存代碼 fprintf(pfo_file,%s\t,my_pfo[i].name)。 i=rec_pfo 。 // } fprintf(pfo_file,%d\n,rec_pfo)。 if (index==1) //假如會(huì)員id為1 { pfo_file = fopen(, w)。}流程圖:在此僅舉view_info(),此為查詢(xún)的主要功能Ⅸ 【Save】副程式程式功能說(shuō)明參數(shù)傳回值save_portfolio( )儲(chǔ)存投資組合紀(jì)錄struct REPORT trade[]:儲(chǔ)存資料的陣列int index:無(wú)save_trade( )儲(chǔ)存交易記錄struct REPORT trade[]:儲(chǔ)存資料的陣列int index:程式碼void save_portfolio(struct PORTFOLIO my_pfo[],int index) //儲(chǔ)存手中持有投資組合{ FILE *pfo_file。4的餘數(shù)是否為0 { printf(\n)。 //列印代碼 printf(%s\t,stock[i].name)。 i=STOCK_NUM 。 printf(代碼\t名稱(chēng)\t代碼\t名稱(chēng)\t代碼\t名稱(chēng)\t代碼\t名稱(chēng)\n)。 //搜尋正確,則傳回該輸入代碼之pointer } } return 1。i=STOCK_NUM 。 //傳回『交易記錄個(gè)數(shù)』}Ⅶ 【Search】.副程式程式功能說(shuō)明參數(shù)傳回值Int search_stock搜尋股票資料struct STOCKINFO stock[]:儲(chǔ)存資料的陣列int choice:欲被搜尋的資料搜尋正確,則傳回該輸入代碼之pointer,搜尋不到該代碼,傳回1int search_club搜尋會(huì)員資料struct CLUB clubs:儲(chǔ)存資料的陣列int choice:欲被搜尋的資料(同上)int search_pfo搜尋投資組合內(nèi)的股票資料struct PORTFOLIO my_pfo[]:儲(chǔ)存資料的陣列int choice:欲被搜尋的資料(同上)程式碼:在此僅舉int search_stock為例,其他程式與其類(lèi)似int search_stock(struct STOCKINFO stock[],int choice){ int i。trade[i].price_sell)。trade[i].mount_sell)。trade[i].price_buy)。trade[i].mount_buy)。trade[i].name)。trade[i].code)。 i=num 。num)。 int num?!?傳回值:無(wú)● 流程圖:Ⅵ 【Load】副程式程式功能說(shuō)明參數(shù)傳回值void load_stock載入股票資料struct STOCKINFO stock[]:儲(chǔ)存資料的陣列FILE *fp:儲(chǔ)存資料的檔案無(wú)void load_club載入會(huì)員資料struct CLUB clubs[]:儲(chǔ)存資料的陣列FILE *fp:儲(chǔ)存資料的檔案int load_pfo載入投資組合資料struct PORTFOLIO my_pfo[]:儲(chǔ)存資料的陣列FILE *fp:儲(chǔ)存資料的檔案投資組合種類(lèi)個(gè)數(shù)Int load_trade載入交易紀(jì)錄資料。■ struct PORTFOLIO my_pfo[]:儲(chǔ)存資料的陣列。● 傳回值:無(wú)● 流程圖:Ⅴ trade_sell() ● 說(shuō)明:紀(jì)錄賣(mài)出股票的資料。■ struct PORTFOLIO my_pfo[]:儲(chǔ)存資料的陣列。 } }}Ⅳ trade_buy● 說(shuō)明:紀(jì)錄買(mǎi)入股票的資料。 default: printf(無(wú)效的選項(xiàng)\n)。 /*********儲(chǔ)存交易記錄結(jié)果**********/ save_trade(trade,index)。q39。 } break。 default: printf(無(wú)效的選項(xiàng)\n)。: print_trade(trade)。 case 39。 Pause()。 printf(已實(shí)現(xiàn)損益=%d\n,profit_real)。: print_portfolio(my_pfo)。 switch(choice) { case 39。choice)。 fflush(stdin)。: profit_pre=calculate_pfo(my_pfo)。 case 39。 //副程式:印出手中持有投資組合 trade_sell(stock,my_pfo,trade)。s39。//副程式:記錄買(mǎi)進(jìn)行為 break。: print_stock(stock)。 case 39。: view_info(stock)。 switch(choice) { case 39。choice)。 fflush(stdin)。 printf(\n)。 printf(\n)。 printf(\n)。 printf(\n)。 printf(\n)。 printf(\n)。 printf(\n)。 printf(\n)。 //投資組合種類(lèi)初始值=0 } fclose(trade_file)。 //呼叫副程式 } else { trade_file = fopen(, w)。 //已實(shí)現(xiàn)損益初始值=0 } fclose(pfo_file)。 //開(kāi)一新檔案 rec_pfo=0。 //重要數(shù)值_紀(jì)錄未實(shí)現(xiàn)損益 char choice。 //開(kāi)啟投資組合記錄檔 FILE *trade_file。 exit(1)。 return result。passwd)。i++) { printf(請(qǐng)輸入會(huì)員密碼:)。 } else { for(i=1。 //呼叫副程式:檢驗(yàn)該id是否為會(huì)員 if(result== 1) { printf(錯(cuò)誤的會(huì)員ID\n)。 printf(\n)。 scanf(%d,amp。 //輸入選項(xiàng)用int result。 }} Ⅱ user_exam(檢驗(yàn)會(huì)員ID,密碼)int user_exam(struct CLUB clubs[]){int i。 default: printf(無(wú)效的選項(xiàng)\n)。 } save_club(clubs)。 exit(1)。 result=search_club(clubs,id)。id)。 fflush(stdin)。d39。 //呼叫副程式:儲(chǔ)存結(jié)果 break。 } break。 scanf(%d,amp。clubs[i].name)。 printf(請(qǐng)輸入新增會(huì)員的姓名:)。 exit(1)。
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1