




下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領
文檔簡介
1、第1題:Program ex301;varu:array0.3 of integer;i,a,b,x,y:integer;begin y:=10; for i:=0 to 3 do read(ui); a:=(u0+u1+u2+u3) div 7; b:=u0 div (u1-u2) div u3); x:=(u0+a+2)-u(u3+3) mod 4; if (x>10) then y:=y+(b*100-u3) div (uu0 mod 3*5) else y:=y+20+(b*100-u3) div (uu0 mod 3*5); writeln (x,',',y);
2、end. *注:本例中,給定的輸入數(shù)據(jù)可以避免分母為 0 或下標越界。 輸入:9 3 9 4輸出: _第2題:program s401; var p,q:array0.5 of integer; i,x,y:integer; begin y:=20; for i:=0 to 4 do read(p); readln; q0:=(p0+p1)+(p2+p3+p4) div 7; q1
3、:=p0+p1 div (p2+p3) div p4); q2:=p0*p1 div p2; q3:=q0*q1; q4:=q1+q2+q3; x:=(q0+q4+2)-p(q3+3) mod 4; If (x > 10) Then y:=y+(q1*100-q3) div (pp4 mod 3*5) Else
4、60; y:=y+20+(q2*100-q3) div (pp4 mod 3*5); writeln(x,',',y); end.輸入:6 6 5 5 3輸出: 第3題:Pro
5、gram ex401;var u,v:array0.3 of integer; i,x,y:integer;begin x:=10; y:=10; for i:=0 to 3 do read(ui); v0:=(u0+u1+u2+u3) div 7; v1:=u0 div (u1-u2) div u3); v2:=u0*u1 div u2*u3; v3:=v0*v1; x:=(v0+v1+2)-u(v3+3) mod 4; if (x>10) then y:=y+(v2*100-v3) div (uu0 mod 3*5) else y:=y+20+(v2*100-v3) div (uv0
6、 mod 3*5); writeln (x,',',y);end. *注:本例中,給定的輸入數(shù)據(jù)可以避免分母為 0 或下標越界。 輸入:9 3 9 4輸出: 第4題:program s402; var a,b:integer; x,y:integer; procedure fun(a,b:integer);
7、160; var k:integer; begin k:=a; a:=b; b:=k; end; begin a:=3; b:=6; x:=a; y:=b;
8、 fun(x,y); write('No.1:',a,',',b,' '); fun(a,b); writeln('No.2:',a,',',b); end. 輸出:
9、60; 第5題:program t1; var n,k,s:longint; begin readln(n); k:=0; s:=1; while s <= n do begin k:=k+1; n:=n-s; s:=s+6*k end; writeln (k) end. 輸入:100 輸出:_ 第6題:var p,q,s,t:integer;beginreadln(p);for q:=p+1 to 2*p dobegint:=0;s:=(p*q)mod(q-p);if s=0 then begin t:=p+q+(p*q)div(q-p);write(
10、t:4); end; end;end. 輸出: _第7題:Program ex402; const m:array0.4 of integer=(2,3,5,7,13); var i,j:integer; t: longint; beginfor i:=0 to 4 do begint:=1;for j:=1 to mi-1 do t:=t*2;t:=(t*2-1)*t; write (t
11、,' '); end;writeln; end.輸出:_ 第8題:program gao7_4;var x,y1,y2,y3:integer;beginreadln(x); y1:=0;y2:=1;y3:=1;while y2<=x dobeginy1:=y1+1;y3:=y3+2;y2:=y2+y3 end;writeln(y1);end.輸入:23420輸
12、出: _ 第9題:program S403; var a1:array1.50 of integer; var i,j,t,t2,n,n2:integer;
13、160; begin n:=50; for i:=1 to n do a1:=0; n2:=round(sqrt(n);
14、 for i:=2 to n2 do If (a1 = 0) Then begin &
15、#160; t2:=n div i; for j:=2 to t2 do a1i*j:=1;
16、160; end; t:=0; for i:=2 to n do
17、0; If (a1 = 0) Then begin write(i:4)
18、; inc(t); if(t mod 10=0) then writeln; end;
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 汽車銷售保價合同協(xié)議
- 廣告運營采購合同模板
- 高項第合同履行與監(jiān)督的現(xiàn)代化手段
- 新疆科技學院《新時代中國特色社會主義與實踐研究》2023-2024學年第二學期期末試卷
- 銀川市靈武市2025年數(shù)學五年級第二學期期末檢測模擬試題含答案
- 內(nèi)蒙古能源職業(yè)學院《鋼琴作品鑒賞》2023-2024學年第一學期期末試卷
- 樂山市五通橋區(qū)2025屆四年級數(shù)學第二學期期末考試試題含解析
- 山東信息職業(yè)技術學院《C語言程序設計(實驗)》2023-2024學年第二學期期末試卷
- 漳州市龍海市2025屆五下數(shù)學期末預測試題含答案
- 吉林省榆樹一中五校2024-2025學年高考數(shù)學試題命題比賽模擬試卷(19)含解析
- 供水管道施工方案
- 2024年上海嘉定區(qū)區(qū)屬國有企業(yè)招聘筆試真題
- 中職高教版(2023)世界歷史-第11課-近代職業(yè)教育的興起和發(fā)展【課件】
- 2025屆高三部分重點中學3月聯(lián)合測評(T8聯(lián)考)地理試卷(河北版含答案)
- 雨污水管道工程專項施工方案
- 中國民族史知到課后答案智慧樹章節(jié)測試答案2025年春云南大學
- 人工智能中的圖像與視頻數(shù)據(jù)高效處理方法研究報告
- 消防中控考試試題及答案
- 中國實景演出行業(yè)市場集中度、市場運行態(tài)勢及未來趨勢預測報告(2025版)
- 2025年長春汽車職業(yè)技術大學單招職業(yè)技能測試題庫參考答案
- 心理健康案例報告-青少年網(wǎng)癮的成因及對策
評論
0/150
提交評論