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

正文內(nèi)容

簡(jiǎn)易股票投資管理系統(tǒng)說明(更新版)

2025-05-18 05:21上一頁面

下一頁面
  

【正文】 RTFOLIO my_pfo[],FILE *fp)。 }。 int mount_buy。 char name[80]。 char name[80]。程式功能:按下Enter繼續(xù)程式碼:char Pause(){ char c。 fclose(pfo_file)。 //儲(chǔ)存張數(shù) fprintf(pfo_file,%f\t,my_pfo[i].price_avg)。 if (index==1) //假如會(huì)員id為1 { pfo_file = fopen(, w)。 i=STOCK_NUM 。 //傳回『交易記錄個(gè)數(shù)』}Ⅶ 【Search】.副程式程式功能說明參數(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為例,其他程式與其類似int search_stock(struct STOCKINFO stock[],int choice){ int i。trade[i].mount_buy)。num)?!?傳回值:無● 流程圖:Ⅴ trade_sell() ● 說明:紀(jì)錄賣出股票的資料。 /*********儲(chǔ)存交易記錄結(jié)果**********/ save_trade(trade,index)。: print_trade(trade)。: print_portfolio(my_pfo)。: profit_pre=calculate_pfo(my_pfo)。//副程式:記錄買進(jìn)行為 break。 switch(choice) { case 39。 printf(\n)。 printf(\n)。 //呼叫副程式 } else { trade_file = fopen(, w)。 //開啟投資組合記錄檔 FILE *trade_file。i++) { printf(請(qǐng)輸入會(huì)員密碼:)。 scanf(%d,amp。 } save_club(clubs)。 fflush(stdin)。 scanf(%d,amp。 result=search_club(clubs,id)。 //輸入選項(xiàng)switch(choice){ case 39。printf( q. 儲(chǔ)存資料並跳出)。 //輸入選項(xiàng)之用printf(管理者順利登入)。 case 39。 if(pwd==8888) //預(yù)設(shè)管理者password = 8888 { manager_main()。 scanf(%c,amp。 } fclose(club_file)。 //輸入選項(xiàng)用_password int user_id。 1主程式 main().● 說明:先載入股票的資料檔,和會(huì)員的個(gè)人資料檔,最後依據(jù)使用者的選項(xiàng)做相對(duì)應(yīng)的動(dòng)作● 參數(shù) :無● 傳回值:無● 流程圖 :管理者部分輸入管理者密碼輸入選項(xiàng)密碼=8888 ?NO離開程式AddQuitDel使用者部分副程式 user_exam :檢驗(yàn)會(huì)員id 與 password通過檢驗(yàn)則會(huì)傳回 會(huì)員id值副程式 user_main :根據(jù)會(huì)員id值開啟其個(gè)人記錄檔,並帶入選單之中離開程式guest部分副程式 view_info:查詢股票資訊離開程式程式碼部分main(){ /******FILE******/ FILE *stock_file。1. 股票的資料結(jié)構(gòu)(STOCKINFO),用來儲(chǔ)存股票的資料。以下列出系統(tǒng)所處理的輸入及輸出檔案介紹及欄位說明:程式所需輸入之資料檔案如下:1. 股票資訊檔: (程式預(yù)設(shè)數(shù)量20)股票的資訊檔案。本系統(tǒng)採用會(huì)員制度,會(huì)員可享用完整的功能,非會(huì)員也擁有查詢股市的功能,十分的方便。另外也提供了以上名詞的簡(jiǎn)易解釋,有助於使用者在基本面的選股判斷。Id 姓名 密碼88214040 童小遠(yuǎn) 123488214034 王小民 56781 unused 11 unused 11 unused 1程式輸出之資料檔案如下:(僅會(huì)員擁有)1. 個(gè)人投資組合(主要用來計(jì)算損益):, 記錄了投資組合種類個(gè)數(shù)、股票代碼、股票名稱、擁有張數(shù)、歷史平均價(jià)格、現(xiàn)價(jià)、個(gè)股之買進(jìn)價(jià)格、已實(shí)現(xiàn)損益。交易記錄(REPORT)欄位意義欄位名稱股票代碼int code股票名稱char name[80]買入張數(shù)int mount_buy買入價(jià)格loat price_buy賣出張數(shù)int mount_sell賣出價(jià)格float price_sell三、 程式說明 寫在前頭、重要須知:此程式有幾點(diǎn)需要事先說明,有助於對(duì)程式的瞭解。 struct PORTFOLIO my_pfo[PFO_NUM+1]。 exit(1)。 printf( 歡迎使用簡(jiǎn)易個(gè)人股票管理系統(tǒng) )。139。 case 39。 view_info(stock)。 printf(\n)。printf(\n)。i=CLUB_NUM。 } else { clubs[i].id=id。 } } save_club(clubs)。 printf(\n)。 break。 result=search_club(clubs,id)。 if (passwd==clubs[result].pwd) //密碼登入正確 { printf(\n會(huì)員順利登入,請(qǐng)繼續(xù)使用\n)。 //輸入選項(xiàng)用 if(index==1) { /*****開啟投資組合檔***********/ if(pfo_file = fopen(, r)) { rec_pfo=load_pfo(my_pfo,pfo_file) //呼叫副程式:load } else { pfo_file = fopen(, w)。 //關(guān)閉讀檔 } while (1) { printf(==========主選單=============)。 printf(s. 紀(jì)錄賣出個(gè)股)。 printf(請(qǐng)選擇 )。 //副程式:觀看個(gè)股資訊 break。: print_portfolio(my_pfo)。 scanf(%c,amp。 fflush(stdin)。 break。 break。■ struct REPORT trade[]:儲(chǔ)存資料的陣列。i++ ) { //依序從檔案讀入資料 fscanf(fp,%d,amp。 fscanf(fp,%d,amp。i++ ) { if(stock[i].code==choice) { return i。 //列印名稱 if ((i%4)==0) //檢查i247。 //儲(chǔ)存投資組合種類個(gè)數(shù) for(i=1 。j=my_pfo[i].mount。 //temp用_加總 for(i=1 。c)。 float EPS。 float price_now。 float price_sell。void user_main(int index,struct STOCKINFO stock[],struct PORTFOLIO my_pfo[],struct REPORT trade[])。int search_club(struct CLUB clubs[],int choice)。void save_trade(struct REPORT trade[],int index)。 struct STOCKINFO stock[STOCK_NUM+1]。 //呼叫副程式:讀入股票檔內(nèi)容 } else { printf(無法開啟股票資料檔,程式終結(jié)!\n)。 printf(\n)。 switch(choice) { case 39。 } break。: printf(歡迎使用此系統(tǒng),請(qǐng)繼續(xù)\n)。 //輸入選項(xiàng)用 int result。 printf(\n)。choice)。id)。 printf(請(qǐng)輸入新增會(huì)員的密碼:)。d39。 exit(1)。 break。id)。passwd)。 FILE *trade_file。 //關(guān)閉讀檔 /*******************開啟交易紀(jì)錄***************/ if(trade_file = fopen(, r)) { rec_trade=load_trade(trade,trade_file)。 printf(v. 觀看個(gè)股資訊)。 printf(q. 儲(chǔ)存結(jié)果並結(jié)束)。 //讀入輸入值 printf(\n)。 //印出基本個(gè)股資訊 trade_buy(stock,my_pfo,trade)。l39。p39。t39。: /*********儲(chǔ)存投資組合結(jié)果**********/ save_portfolio(my_pfo,index)。i++ ) { fscanf(fp,%d,amp。 //股本(億) fscanf(fp,%f,amp。 i=CLUB_NUM 。 int num。my_pfo[i].name)。j=my_pfo[i].mount。 fscanf(fp,%d,amp。 fscanf(fp,%d,amp。 } return num。i=CLUB_NUM 。 //搜尋不到該代碼,傳回1}void trade_buy(struct STOCKINFO stock[],struct PORTFOLIO my_pfo[],struct REPORT trade[]){ int i。 scanf(%d,amp。 printf(\n)。 strcpy(my_pfo[rec_pfo].name,stock[result2].name)。 //交易記錄+1 trade[rec_trade].code=stock[result2].code。 price_buy0) //價(jià)格,張數(shù)是否合理 { /***************在投資組合中記錄買進(jìn)動(dòng)作**********/ temp=my_pfo[result1].mount+1。 } my_pfo[result1].price_avg=temp_sum/my_pfo[result1].mount。 } }}void trade_sell(struct STOCKINFO stock[],struct PORTFOLIO my_pfo[],struct REPORT trade[]){ int i。 scanf(%d,amp。 printf(\n)
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1