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

正文內(nèi)容

簡易股票投資管理系統(tǒng)說明(參考版)

2025-04-12 05:21本頁面
  

【正文】 printf(此次交易實(shí)現(xiàn)損益=%d\n,temp_ca。price_sell0) { if((my_pfo[result].mountm)0) // CASE1:庫存張數(shù)賣出張數(shù) { /*****在投資組合中修改張數(shù),平均價(jià)並計(jì)算已實(shí)現(xiàn)損益******/ my_pfo[result].mount=my_pfo[result].mountm。 } else { if(m0amp。 result=search_pfo(my_pfo,code)。m)。 printf(請輸入賣出張數(shù)(若不賣出請輸入1))。 scanf(%f,amp。code)。 //temp用_計(jì)算實(shí)際交易價(jià)差 printf(請輸入股票代碼)。 //輸入用_張數(shù) int temp。 //結(jié)果值_儲(chǔ)存Search傳回值 float price_sell。 int code。 } else { printf(請重新選擇\n)。 trade[rec_trade].price_buy=price_buy。 strcpy(trade[rec_trade].name,my_pfo[result1].name)。/*記錄買進(jìn)歷史平均價(jià)*/ /***************在交易記錄檔中記錄買進(jìn)動(dòng)作**********/ rec_trade=rec_trade+1。i++) //計(jì)算買進(jìn)歷史平均價(jià) { temp_sum=temp_sum+my_pfo[result1].price_buy[i]。 //記錄買進(jìn)價(jià)格 } for (i=1。i=my_pfo[result1].mount。 my_pfo[result1].mount=my_pfo[result1].mount+m。amp。 } else { printf(請重新選擇\n)。 trade[rec_trade].price_buy=price_buy。 strcpy(trade[rec_trade].name,stock[result2].name)。 //記錄買進(jìn)歷史平均價(jià) /***************在交易記錄檔中記錄買進(jìn)動(dòng)作**********/ rec_trade=rec_trade+1。i++) { my_pfo[rec_pfo].price_buy[i]=price_buy。 /*記錄買進(jìn)個(gè)股現(xiàn)價(jià):計(jì)算未實(shí)現(xiàn)損益用*/ for(i=1。 my_pfo[rec_pfo].mount=m。 //投資組合種類+1 my_pfo[rec_pfo].code=stock[result2].code。amp。 //搜尋股票資料中是否有該代碼 if(result2==1) { printf(無此代碼,請從新選擇\n)。 result1=search_pfo(my_pfo,code)。m)。 printf(請輸入購買張數(shù)(若不購買請輸入1))。 scanf(%f,amp。code)。 //temp用_加總 printf(請輸入股票代碼)。 //輸入用_張數(shù) int temp。 //結(jié)果值_儲(chǔ)存Search傳回值 float price_buy。 int code。 //搜尋正確,則傳回該輸入代碼之pointer } } return 1。i=rec_pfo 。 //搜尋不到該代碼,傳回1}int search_pfo(struct PORTFOLIO my_pfo[],int choice){ int i。i++ ) { if(clubs[i].id==choice) { return i。 for(i=1 。 //搜尋正確,則傳回該輸入代碼之pointer } } return 1。i=STOCK_NUM 。 //傳回『交易記錄個(gè)數(shù)』}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。 //讀入『已實(shí)現(xiàn)損益』 return num。 //讀入個(gè)股之買進(jìn)價(jià)格 } } fscanf(fp,%d,amp。j++) { fscanf(fp,%f,amp。 //讀入個(gè)股現(xiàn)價(jià) for(j=1。 //讀入個(gè)股買進(jìn)歷史平均價(jià) fscanf(fp,%f,amp。 fscanf(fp,%f,amp。 fscanf(fp,%d,amp。 fscanf(fp,%s,amp。i++ ) { fscanf(fp,%d,amp。 //讀入投資組合種類個(gè)數(shù) for(i=1 。 fscanf(fp,%d,amp。 //讀入會(huì)員密碼 }}int load_pfo(struct PORTFOLIO my_pfo[],FILE *fp){ int i,j。 //讀入會(huì)員名稱 fscanf(fp,%d,amp。 //讀入會(huì)員ID fscanf(fp,%s,amp。i++ ) { fscanf(fp,%d,amp。 for(i=1 。stock[i].netvalue)。 //本益比=現(xiàn)價(jià)247。stock[i].EPS)。stock[i].equity)。stock[i].price)。stock[i].name)。stock[i].code)。 i=STOCK_NUM 。 } }}void load_stock(struct STOCKINFO stock[],FILE *fp) //讀入個(gè)股資訊{ int i。 default: printf(無效的選項(xiàng)\n)。 /*********儲(chǔ)存交易記錄結(jié)果**********/ save_trade(trade,index)。q39。 } break。 default: printf(無效的選項(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。 //記錄買進(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)。 //投資組合種類初始值=0 } fclose(trade_file)。//呼叫副程式:讀取交易紀(jì)錄與內(nèi)容 } else { trade_file = fopen(, w)。 //已實(shí)現(xiàn)損益初始值=0 } fclose(pfo_file)。 //先前並無存檔記錄,開一新檔案 rec_pfo=0。 //輸入選項(xiàng)用 if(index==1) //會(huì)員位置1 { /****************開啟投資組合記錄檔************/ if(pfo_file = fopen(, r)) { rec_pfo=load_pfo(my_pfo,pfo_file)。 int profit_pre。 }}void user_main(int index,struct STOCKINFO stock[],struct PORTFOLIO my_pfo[],struct REPORT trade[]){ FILE *pfo_file。 } } else { printf(錯(cuò)誤的會(huì)員ID\n)。 //會(huì)員登入正確,傳回其index } } printf(登入錯(cuò)誤超過3次,請重新登入\n)。 if (passwd==clubs[result].pwd) { printf(順利登入,%s先生請繼續(xù)使用\n,clubs[result].name)。 scanf(%d,amp。i=3。 exit(1)。 if (id0) //若id=1為非正確會(huì)員 { result=search_club(clubs,id)。 scanf(%d,amp。 //輸入選項(xiàng)用 int result。 }}int user_exam(struct CLUB clubs[]) //副程式功能:檢驗(yàn)會(huì)員ID 密碼{ int i。 default: printf(無效的選項(xiàng)\n)。: exit(1)。 case 39。 } save_club(clubs)。 } else { clubs[result].id=1。 //呼叫副程式:查詢是否在會(huì)員名單中 if(result==1) { printf(會(huì)員ID輸入錯(cuò)誤,請重新執(zhí)行\(zhòng)n)。 printf(\n)。 scanf(%d,amp。: printf(請輸入欲刪除會(huì)員ID:)。 case 39。 } } save_club(clubs)。 printf(會(huì)員ID新增完成\n)。 scanf(%d,amp。clubs[i].name)。 printf(請輸入新增會(huì)員的姓名:)。 exit(1)。 result=search_club(clubs,id)。 scanf(%d,amp。i++) { if(clubs[i].id==1) // 1:尚未使用 { printf(會(huì)員新增資料將建立在第%d位置\n,i)。: for(i=1。 switch(choice) { case 39。 scanf(%c,amp。 printf(請選擇)。 printf(==================================================)。 printf( q. 離開程式)。 printf( d. 刪除會(huì)員)。 printf( a. 新增會(huì)員)。 printf(====================main menu=====================)。 //儲(chǔ)存?zhèn)骰刂? printf(管理者順利登入)。 int id。 }}vo
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1