遼寧工程技術大學實驗報告程序設計_第1頁
遼寧工程技術大學實驗報告程序設計_第2頁
遼寧工程技術大學實驗報告程序設計_第3頁
遼寧工程技術大學實驗報告程序設計_第4頁
遼寧工程技術大學實驗報告程序設計_第5頁
已閱讀5頁,還剩2頁未讀 繼續免費閱讀

下載本文檔

版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領

文檔簡介

1、1.已知函數f(x)x 1,1 x 01,0x1計算 f ( 1), f(0.5), f (1.5)。x21x2Editor - ATI_AB7wqrkE3(am 1_1 .rnFile Edit Text 亡 ull Tools DebDes kt op Window Helpm矍m昌軸九&總電嗚Kfunct Lcn out pvt-Sifge = lint it ledl t input_args j ENTITLED】 Sijmary of thi了ion 篡ow黑 Detailed eKplanation gees here function. y=exajil_ 1 l沁if x=-

2、l=0xClm;elseif ji=1x=2V=t2-endi 11001、用for-end 循環語句求:100 !和 i 。Editcr C: ; V ATLA B7aoml_2 .rnFiIb Edit T Cell Tooli Debug Deiltiap Window HdpD詫|X * fi 膏巒煩耳1 fjncticn outpjt.srfs = Untitled;( irjutatff2 HUNTITLEDl Sunnaey ai fkis fimctien jose he:!3 % DEttild explanation joes here4 funrticn :/=Kinl_

3、2(ri)5 - 7=1;o -Ior i-ltnr -冃y勺 Editor - C MA-LAB.workexam 1_ 1 ,rnFile Edit Teed Cell Toalf Debu 靭 D 鮎 litcp Wine on He p2 、為二魚衲蘭口粉1 備met ion output.arjs - thtiUsdl : input.arjf )2 OTHLEI1 Sjiuiary of this fimrtiMi jots her3 幣 Detailed asplanatian goes here4 Cell Tools Osbug Desktop Wiridow Help Q

4、鼻 ffl 宀 * 3 #4 A 1%mjction outpu+_args = Untit ledl ( rnput_args )zPSUUTITLEDl Sujuuary of this functionhere3購 Detail&d explanation goes here4fuiiction y=eKamL_l5 -n=0:6 -y=o. y=exajil_ 17 -vklle5 tin+2;y =3 -y=y+ti.ia -ead250500習 Edrtor - CiMATLABm 1_2.nfiFile Edit Text Cell T ools Dehug Desktop Wi

5、ndonw HelpD創 站唱口 c|乳憑|曹唱1 function ou+put_args = Untitled 1( input_args )2 UNTITLED I Sununary o t his -funcrtion goes here3 臉 Det ailed explanation goes here4 function y=eKajnl_l y=ezaml_22510015 -n-1;e-y=i;7 -while Tll=fix(jn/100);1 -ni2=reni(f 1.x (m/10)3 10);8 -mJ二:rem(叫 ID);9 -nL=ml+ni2!il 04th

6、3* 100 仲朗;anl_4諸輸入一個三ft: S38 m 二8367、輸入一個百分制成績,要求輸出成績等級A, B, C, D E其中90-100位A, 80-89為B,70-79 為 C, 60-69 為 D, 60 以下為 E1)分別用if語句和switch語句實現2)輸入百分制成績后要判斷成績的合理性,對不合理的成績應輸出出錯信息。Editor -匚: MATLA B7worexam l_ 5. itFile Edit Text 匚 ell Tools Debug Deikt12345function Qutput_arss = Unt UNTITLEDI Sumnary of th

7、is finer % Derailed explanation gpes Ae fnnrtinn n=PX;m1_FiV Ed iter - C: MAT LAvl00|n0五sp輸A錯崇Telseif n=9(disp ( A ):el seif片創disD C陽丨:elseif n=70riispt C );elseif n=6CdisrC D):elserlijqpr F? 1 ;end n=exanl_5 清犒入學生成第:98 止 n=examl_5 悟輻扎學生咸韁:87B nBX3nl_5 潔輸入學生成猜;?4 C rLEKMll _5 諸輸入學主成韁:05 D TL=examl_S請輸入學生戰績:32E n=6Kanl_&請輸入學生1花輸入錯諜!1 -8 -9 _10 L11 -12 -13 -14 -15 -16 -17 -1818 -19 -input(卞輸入學主廟耀:EWLtth fix (n/10)匚遜匕9disp (W;case 8dispCM),case 71dispCC7 ) husse 6diep ( D),case Oj 1, 2, 3j 4, 5 disp CE*);othcriiiao五汕輸人錯喫! rend n=exa

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯系上傳者。文件的所有權益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
  • 4. 未經權益所有人同意不得將文件中的內容挪作商業或盈利用途。
  • 5. 人人文庫網僅提供信息存儲空間,僅對用戶上傳內容的表現方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
  • 6. 下載文件中如有侵權或不適當內容,請與我們聯系,我們立即糾正。
  • 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論