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

正文內(nèi)容

[工學(xué)]c程序設(shè)計(jì)設(shè)計(jì)性實(shí)驗(yàn)報(bào)告-資料下載頁

2025-04-11 22:23本頁面
  

【正文】 。amp。amp。buffer1[i+1]==39。\039。) buffer1[i]=39。\039。} m_edit1=(CString)buffer1。label: UpdateData(false)。}void CCalcDlg::OnOP() { // TODO: Add your control notification handler code here CString str1。 char s[]= \n\n請認(rèn)真閱讀操作聲明后再進(jìn)行操作 !\n\n\n\n1. 該計(jì)算器只能做關(guān)于加減乘除的表達(dá)式運(yùn)算,但表達(dá)式中不能有其他的運(yùn)算如開方,平方,對數(shù),cos ,sin等.\n\n\n2 .不能處理以+,,*,/ \開頭\的表達(dá)式,如\ +12(3+5) \計(jì)算器會(huì)出現(xiàn)問題自動(dòng)關(guān)閉,此時(shí)重新運(yùn)行計(jì)算器即可.\n\n\,所輸入的數(shù)必須是一個(gè)整數(shù)\n\n\,八進(jìn)制,十六進(jìn)制數(shù)之間不能相互轉(zhuǎn)化.\n\.\n\n\ 開方,平方, 取對數(shù),三角函數(shù),進(jìn)制轉(zhuǎn)換等操作先輸入數(shù)字再按相應(yīng)的功能按鈕即可.\n\n\n7. 帶有加減乘除的表達(dá)式不能作為函數(shù)的參數(shù).\n\n\n\n\n\n\n。 (%s,s)。 MessageBox(str1,計(jì)算器操作說明)。 UpdateData(false)。 }void CCalcDlg::OnZhuti() { // TODO: Add your control notification handler code here CString str1。 char s[]= \n1. 作 者 : 馮 凱\n\n2. 學(xué) 號(hào): 200612010115.\n\n3. 所 在 單 位:理學(xué)院數(shù)學(xué)061.\n\n4. 完 成 日 期: 2008年11月25日. \n\n5. 版 本 信 息: 版.\n\n6. 功 能 簡 介:\n\n可以處理 + * / 的表達(dá)式運(yùn)算如 \)*(+)/5\\n\n可以進(jìn)行數(shù)的進(jìn)制轉(zhuǎn)換操作.\n\n可以進(jìn)行 開方,平方,取對數(shù)等運(yùn)算.\n\n可進(jìn)行三角函數(shù)運(yùn)算. \n\n\n\n\n\n\n\n。 (%s,s)。 MessageBox(str1,關(guān)于計(jì)算器主題)。 UpdateData(false)。}void CCalcDlg::Onexit() { // TODO: Add your control notification handler code here exit(1)。}////////////////////////////////////////////////////子模塊 中綴表達(dá)式轉(zhuǎn)換為后綴表達(dá)式以及其計(jì)算和進(jìn)制轉(zhuǎn)換////////////////Stackincludeincludeincludetypedef double ElemType。typedef char ElemType2。struct Stack{ ElemType *stack。int top。int MaxSize。}。////////////////////////////////////// _declspec(dllexport) void Initiatestack(Stack amp。S){ =50。=new ElemType[]。if(!){coutthe mem is not enough\n。exit(1)。}=1。}/////////////////////////////////////////////_declspec(dllexport)void Push(Stackamp。 S,ElemType item){ if(==){ int k=sizeof(ElemType)。=(ElemType*)realloc(,*k*2)。=2*。}++。[]=item。}//////////////////////////////////////////_declspec(dllexport)ElemType Pop(Stackamp。 S){ if(==1){cout Stack is full\n。exit(1)。}。return [+1]。}////////////////////////////////////////////_declspec(dllexport)ElemType Peek(Stack amp。S){ if(==1){ cout Stack is empty\n。exit(1)。}return []。}/////////////////////////////////////////////_declspec(dllexport)bool EmptyStack(Stack amp。S){ return ==1。}/////////////////////////////////////////////_declspec(dllexport)void ClearStack(Stack amp。S){ if(){delete [] 。=0。}=1。=0。}///////////////////////stack2struct Stack2{ ElemType2 *stack。int top。int MaxSize。}。_declspec(dllexport)void Initiatestack2(Stack2 amp。S){ =50。=new ElemType2[]。if(!){coutthe mem is not enough\n。exit(1)。}=1。}_declspec(dllexport)void Push2(Stack2amp。 S,ElemType2 item){ if(==){ int k=sizeof(ElemType2)。=(ElemType2*)realloc(,*k*2)。=2*。}++。[]=item。}_declspec(dllexport)ElemType2 Pop2(Stack2amp。 S){ if(==1){cout Stack is full\n。exit(1)。}。return [+1]。}_declspec(dllexport)ElemType2 Peek2(Stack2 amp。S){ if(==1){ cout Stack is empty\n。exit(1)。}return []。}_declspec(dllexport)bool EmptyStack2(Stack2 amp。S){ return ==1。}/////////////////////////////////////////////_declspec(dllexport)void ClearStack2(Stack2 amp。S){ if(){delete [] 。=0。}=1。=0。}///////優(yōu)先級(jí)_declspec(dllexport) int Precedence(char op){ switch(op){ case39。+39。:case39。39。:return 1。case39。*39。:case39。/39。:return 2。case39。(39。:case39。@39。:default:return 0。}}///////將中綴表達(dá)式轉(zhuǎn)換為后綴表達(dá)式,中綴在str1中,后綴在str2中_declspec(dllexport) int change(char* str1,char*str2){ Stack2 R。Initiatestack2(R)。Push2(R,39。@39。)。int i=0,j=0。char ch=str1[i]。while(ch!=39。\039。){ if(ch==39。 39。)ch=str1[++i]。else if(ch==39。(39。){Push2(R,ch)。ch=str1[++i]。}else if(ch==39。)39。){ while(Peek2(R)!=39。(39。)str2[j++]=Pop2(R)。Pop2(R)。ch=str1[++i]。}else if(ch==39。+39。||ch==39。39。||ch==39。*39。||ch==39。/39。){ char w=Peek2(R)。while(Precedence(w)=Precedence(ch)){str2[j++]=w。Pop2(R)。w=Peek2(R)。}Push2(R,ch)。ch=str1[++i]。} else{ if(ch39。039。||ch39。939。amp。amp。ch!=39。.39。){ coutte expersion is error\n。return 0。}while((ch=39。039。amp。amp。ch=39。939。)||ch==39。.39。){ str2[j++]=ch。ch=str1[++i]。}str2[j++]=39。 39。}}ch=Pop2(R)。while(ch!=39。@39。){ if(ch==39。(39。) {coutthe expersion is error\n。return 0。}else { str2[j++]=ch。ch=Pop2(R)。}}str2[j++]=39。\039。return 1。}/////////////////////////////////////////////////////////////////////////////計(jì)算后綴表達(dá)式的值**********************************如果返回sqrt(2)表示分母為0或表達(dá)式錯(cuò)誤;_declspec(dllexport) double pute(char *str){ Stack S。Initiatestack(S)。double x,y。int i=0。while(str[i]){ if(str[i]==39。 39。){ i++。continue。}switch(str[i]){ case39。+39。:x=Pop(S)+Pop(S)。 i++。 break。case39。39。:x=Pop(S)。 x=Pop(S)x。 i++。 break。case39。*39。:x=Pop(S)*Pop(S)。 i++。 break。case39。/39。:x=Pop(S)。 if(x!=||x!=0) x=Pop(S)/x。 else{ cout Divide by 0 !\n。 return sqrt(2)。 } i++。 break。default:x=0。 while(str[i]=48amp。amp。str[i]=57) { x=x*10+str[i]48。 i++。 } if(str[i]==39。.39。) { i++。 y=0。 double j=。 while(str[i]=48amp。amp。str[i]=57) { y=y+(str[i]48)/j。 i++。 j*=10。 } x+=y。 }}Push(S,x)。}if(EmptyStack(S)){cout Stack is empty\n。return sqrt(2)。}x=Pop(S)。if(EmptyStack(S))return x。else {cout expersion is error。return sqrt(2)。}ClearStack(S)。}_declspec(dllexport)double* tranfrom(double num,int r){ Stack s。 int i=0,k。double a[10000]={0}, *p=a。Initiatestack(s)。int n。n=(int)num。while(n!=0){ k=n%r。Push(s,k)。n/=r。}while(!EmptyStack(s)){ p[i]=Pop(s)。 i++。}p[i]=39。39。return p。}47免責(zé)聲明:文檔在線網(wǎng)中所有的文檔資料均由文檔在線網(wǎng)會(huì)員提供,該文檔資料的版權(quán)屬于提供者所有。文檔在線網(wǎng)會(huì)對會(huì)員提供的文檔資料進(jìn)行篩選和編輯,但是并不聲明或保證其內(nèi)容的合法性和正確性。
點(diǎn)擊復(fù)制文檔內(nèi)容
法律信息相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1