M語言,Cache資料庫(第乙個計算器演算法,哭

2021-08-29 12:24:13 字數 1739 閱讀 9222

我的計算器(

calculatev1

main ; 主迴圈函式

do while num1'=""

quit

///輸入

input() [num1,num2,operator1,operator2,result,flag,arrpri]

quit:num1=""

forif (operator1?1"=")else

} for

;quit:num2=""

fordo prior

if arrpri(operator1,operator2) = "^"elseif arrpri(operator1,operator2) = 1elseif arrpri(operator1,operator2) = 2

;set operator1 = operator2

} }

///按順序運算

cal1()[num1,num2,operator1,operator2,result]elseif (operator1?1"-")elseif (operator1?1"*")elseif (operator1?1"/")

kill arrpri(operator1,operator2)

}///先算後面*,/,後算前面+,-

cal2()[num1,num2,operator1,operator2,result,flag,arrpri]

if (operator2?1"*")elseif (operator2?1"/")

kill arrpri(operator1,operator2)

set result = num1

fordo prior

if arrpri(operator1,operator2) = "^"elseif arrpri(operator1,operator2) = 1elseif arrpri(operator1,operator2) = 2 }

///輸出

display()[num1,num2,operator1,operator2,result]

///設定相鄰運算子優先順序

prior()[operator1,operator2,arrpri]elseif (operator1?1"-")elseif (operator1?1"*")elseif (operator1?1"/")

}elseif(operator1?1"+")

elseif (operator2?1"-")elseif (operator2?1"*")elseif (operator2?1"/")

}elseif(operator1?1"-")

elseif (operator2?1"-")elseif (operator2?1"*")elseif (operator2?1"/")

}elseif(operator1?1"*")

elseif (operator2?1"-")elseif (operator2?1"*")elseif (operator2?1"/")

}elseif(operator1?1"/")

elseif (operator2?1"-")elseif (operator2?1"*")elseif (operator2?1"/")

}}///判斷輸入的是否為數字

isnum(num)else

}///判斷輸入的是否為運算子

isoperator(operator)else

}

處理第乙個HANA資料庫故障

fail process hdbindexserver hdb indexserver not running fail process hdb indexserver not running hana2.0 sp43,s4 1909安裝好後,聯想的s30硬體一直很穩定,一次也沒有halt過。主機三...

第乙個C語言

c語言是在b語言 bcpl 的基礎上建立起來的。b語言由unix的研製者丹尼斯 里奇和肯 湯普遜於1970年研製。unix開發者是肯 湯普遜 由於c語言執行於at t的多使用者 多工的unix作業系統上,unix被丹尼斯 里奇改為unix c 20世紀70年代初期,at tbell實驗室的程式設計師...

第乙個C語言程式

編寫第乙個c語言程式,在螢幕顯示hello world 也就是列印hello world 編寫工具為coderunner include 包含檔案標頭檔案 int main int argc,char argv include 求1到100的總和 int main int argc,char arg...