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

正文內(nèi)容

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

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

下一頁面
  

【正文】 scanf(%d,amp。 printf( d. 刪除會(huì)員)。 //呼叫副程式 user_exam user_main(user_id,stock,my_pfo,trade)。 printf(\n)。 char choice。 (程式預(yù)設(shè)數(shù)量100)二、 應(yīng)用層面說明 此系統(tǒng)除了可運(yùn)用在個(gè)人股票的管理外,還可以運(yùn)用在入口網(wǎng)站會(huì)員的自選股票交易管理上,用來記錄大量的會(huì)員股市交易和損益。 組長 : 89214020 潘國成組員 : 88214028 簡(jiǎn)維新 88214034 王宏民 88214040 童世遠(yuǎn) 簡(jiǎn)易股票投資管理系統(tǒng)包括:交易個(gè)數(shù)、股票代碼、股票名稱、買進(jìn)張數(shù)、買進(jìn)價(jià)格、賣出張數(shù)、賣出價(jià)格。 struct CLUB clubs[CLUB_NUM+1]。 printf(請(qǐng)選擇登入身分 )。: user_id=user_exam(clubs)。printf(\n)。 printf(請(qǐng)輸入新增會(huì)員的ID:)。 case 39。int id,passwd。 //傳回會(huì)員index } } printf(登入錯(cuò)誤超過3次,請(qǐng)重新登入\n)。 printf(=================================)。 //清除之前輸入殘留值 scanf(%c, amp。//副程式:記錄賣出行為 break。 break。● 參數(shù):■ struct STOCKINFO stock[]:儲(chǔ)存資料的陣列。 fscanf(fp,%s,amp。 //搜尋不到該代碼,傳回1}Ⅷ 【Print】副程式程式功能說明參數(shù)傳回值view_info()列印個(gè)股詳細(xì)資料struct STOCKINFO stock[]:儲(chǔ)存資料的陣列無print_stock()列印個(gè)股基本資訊struct STOCKINFO stock[]:儲(chǔ)存資料的陣列無print_portfolio( )列印投資組合struct PORTFOLIO my_pfo[]:儲(chǔ)存資料的陣列無print_trade( )列印交易記錄struct REPORT trade[]:儲(chǔ)存資料的陣列無程式碼:在此僅舉print_stock為例,其他程式與其類似void print_stock(struct STOCKINFO stock[]) //列印個(gè)股基本資訊{ int i。i++ ) { fprintf(pfo_file,%d\t,my_pfo[i].code)。i++ ) { temp_sum=temp_sum+(my_pfo[i].price_nowmy_pfo[i].price_avg)*my_pfo[i].mount*1000。 char netvalue[10]。 struct CLUB{ int id。void view_info(struct STOCKINFO stock[])。 struct REPORT trade[TRADE_NUM+1]。 printf(\n)。239。 printf(\n)。a39。clubs[i].pwd)。 printf(會(huì)員ID刪除完成\n)。 //呼叫副程式:查詢是否在會(huì)員名單中 if(result==1) { printf(錯(cuò)誤的會(huì)員ID\n)。 //紀(jì)錄未實(shí)現(xiàn)損益 char choice。 printf(b. 紀(jì)錄買進(jìn)個(gè)股)。v39。//計(jì)算未實(shí)現(xiàn)損益 printf(p列印投資組合結(jié)果\tt列印交易記錄結(jié)果\n請(qǐng)選擇)。 //列印交易記錄結(jié)果 break。 //個(gè)股代碼 fscanf(fp,%s,amp。clubs[i].id)。my_pfo[i].mount)。 //讀入『交易記錄個(gè)數(shù)』 for(i=1 。 for(i=1 。 //輸入用_股票代號(hào) int result1,result2。 //搜尋投資組合中是否有該代碼 if(result1==1) { result2=search_stock(stock,code)。 trade[rec_trade].mount_buy=m。 trade[rec_trade].code=my_pfo[result1].code。 printf(請(qǐng)輸入賣出價(jià)格)。 temp_cal=(price_sellmy_pfo[result].price_avg)*m*1000。 //temp用_紀(jì)錄位置 int temp_cal。i=my_pfo[result1].mount。 //記錄買進(jìn)價(jià)格 } my_pfo[rec_pfo].price_avg=price_buy。 scanf(%d,amp。i++ ) { if(my_pfo[i].code==choice) { return i。 fscanf(fp,%f,amp。 //傳回『投資組合種類個(gè)數(shù)』}int load_trade(struct REPORT trade[],FILE *fp){ int i。my_pfo[i].code)。 //個(gè)股淨(jìng)值 }}void load_club(struct CLUB clubs[],FILE *fp){ int i。 for(i=1 。 break。 //記錄賣出行為 break。 //清除之前輸入殘留值 scanf(%c, amp。 printf(======================================)。 exit(1)。 //儲(chǔ)存?zhèn)骰刂? printf(請(qǐng)輸入會(huì)員ID:)。 result=search_club(clubs,id)。 scanf(%s,amp。 fflush(stdin)。 //輸入選項(xiàng)用 int i。 if(pwd==8888) //預(yù)設(shè)管理者password = 8888 { manager_main(clubs)。 } fclose(club_file)。 //紀(jì)錄交易記錄的次數(shù)main(){ FILE *stock_file。int load_trade(struct REPORT trade[],FILE *fp)。 float price_buy。 float price。 //關(guān)閉檔案}Ⅹ 【其他】int calculate_pfo(struct PORTFOLIO my_pfo[])程式功能:計(jì)算未實(shí)現(xiàn)損益主要計(jì)算公式:Σ(現(xiàn)價(jià)歷史平均價(jià))*張數(shù)*1000參數(shù):struct PORTFOLIO my_pfo[]傳回值:temp_sum加總後之值程式碼:int calculate_pfo(struct PORTFOLIO my_pfo[]) //計(jì)算未實(shí)現(xiàn)投資損益{ int i。 // } else if (index==2) //假如會(huì)員id為2 { pfo_file = fopen(, w)。 for(i=1 。 //讀入『交易記錄個(gè)數(shù)』 for(i=1 。 /*************結(jié)束程式**************/ exit(1)。 //副程式:印出持有投資組合 printf(未實(shí)現(xiàn)損益=%d\t,profit_pre)。 case 39。 printf(======================================)。 //開一新檔案 rec_trade=0。 scanf(%d,amp。 //呼叫副程式:儲(chǔ)存結(jié)果 break。clubs[i].pwd)。a39。printf(\n)。 //呼叫副程式manager_main } else { printf(密碼輸入錯(cuò)誤!!!!請(qǐng)輸入正確密碼\n)。 //關(guān)閉讀檔 printf(=========================================================)。 FILE *club_file。包含下例欄位:● 股票代碼:證交所每支股票都有其編號(hào),以方便交易??晒┎樵冎?xiàng)目分別為:股票代碼、股票名稱、股票價(jià)格、股本、EPS、本益比、每股淨(jìng)值。 投資組合結(jié)構(gòu)(PORTFOLIO)欄位意義欄位名稱股票代碼int code股票名稱char name[80]張數(shù)int mount買入歷史平均價(jià)float price_avg個(gè)股現(xiàn)價(jià)float price_now買入的價(jià)格float price_buy[50]4. 交易記錄的資料結(jié)構(gòu)檔(REPORT):用來存放每次交易的資料。 //呼叫副程式:讀入股票檔內(nèi)容 } else { printf(無法開啟股票資料檔,程式終結(jié)!\n)。 //輸入選項(xiàng) switch(choice) { case 39。: printf(歡迎使用此系統(tǒng),請(qǐng)繼續(xù)\n)。printf(==================================================)。 exit(1)。id)。 printf(\n)。 //重要數(shù)值_紀(jì)錄未實(shí)現(xiàn)損益 char choice。 printf(\n)。: view_info(stock)。 fflush(stdin)。 default: printf(無效的選項(xiàng)\n)?!?struct PORTFOLIO my_pfo[]:儲(chǔ)存資料的陣列。trade[i].price_buy)。 //列印代碼 printf(%s\t,stock[i].name)。 //儲(chǔ)存現(xiàn)價(jià) for(j=1。 scanf(%c,amp。 float price_avg。int user_exam(struct CLUB clubs[])。void save_portfolio(struct PORTFOLIO my_pfo[],int index)。 //輸入選項(xiàng)用_user_id /*************open stock file****************************/ if(stock_file = fopen(, r)) { load_stock(stock,stock_file)。choice)。339。 printf( d. 刪除會(huì)員)。 scanf(%d,amp。 case 39。: exit(1)。 scanf(%d,amp。 //已實(shí)現(xiàn)損益初始值=0 } fclose(pfo_file)。 printf(\n)。: print_stock(stock)。 switch(choice) { case 39。q39。stock[i].equity)。 //讀入會(huì)員密碼 }}int load_pfo(struct PORTFOLIO my_pfo[],FILE *fp){ int i,j。 //讀入個(gè)股現(xiàn)價(jià) for(j=1。trade[i].name)。 for(i=1 。 //temp用_加總 printf(請(qǐng)輸入股票代碼)。 //投資組合種類+1 my_pfo[rec_pfo].code=stock[result2].code。amp。 } else { printf(請(qǐng)重新選擇\n)。m)。 result=search_pfo(my_pfo,code)。
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1