黄色在线观看视频-黄色在线免费看-黄色在线视频免费-黄色在线视频免费看-免费啪啪网-免费啪啪网站

查看全部128種考試
軟件水平考試
 考試動(dòng)態(tài) 報(bào)考指南 歷年真題 模擬試題 復(fù)習(xí)資料 心得技巧 專(zhuān)業(yè)英語(yǔ) 技術(shù)文章 軟考論壇 考試用書(shū)
 程序員 軟件設(shè)計(jì)師 網(wǎng)絡(luò)管理員 網(wǎng)絡(luò)工程師 系統(tǒng)分析師 數(shù)據(jù)庫(kù)系統(tǒng)工程師
1
2
3
4
5
6
7
8
9
10
xihuyu2000  
【字體: 1989年程序員考試試題下午試題
1989年程序員考試試題下午試題
spks.exam8.com 來(lái)源:考試吧(Exam8.com) 更新:2005-4-10 8:05:00 軟件水平考試 考試論壇

   [程序]

procedure indexed (var seqfile : tseqfile; var index file : tindxfile);

const arsize = 100;

type tmparray = array [1..arsize] of tmpelement;

tmpfile = file of tmpelement;

var a : tmparray;

g,h : tmpfile;

n,recno : integer;

s : boolean;

procedure sort(var a : tmparray; n : integer); {將數(shù)組a的前n個(gè)元素按key遞增排序,本過(guò)程的過(guò)程體省略}

procedure combi(var f1,f2 : tmpfile); {將文件f1與數(shù)組a按關(guān)鍵字值從小到大合并于文件f2}

var i,j : integer;

begin i:=1; reset(f1); rewrite(f2);

while ________________ do

begin

if f1^.key <= a[i].key then

begin f2^:=f1^; get(f1) end

else

begin ___________ ; __________ end;

put (f2);

end;

while not eof(f1) do

begin f2^:=f1^; get(f1); put(f2) end;

for j:= i to n do

begin f2^:=a[j]; put(f2) end

end;

procedure gindex (var f:tmpfile);

begin rewrite (indexfile); reset(f);

while not eof(f) do

begin indexfile^:=f^.no;

put (indexfile); get(f)

end

end;

begin reset(seqfile); recno:=0;s:=true;

repeat n:=0 ;

while ____________ do

begin n:=n+1; a[n].key:=seqfile^.key;

recno:=recno+1;a[n].no:=recno;

get(seqfile)

end;

sort(a,n);

if s then combi(g,h)

else combi(h,g);

_______________________

until eof (seqfile);

if ________________ then gindex(g)

else gindex(h)

end;

    試題11

    [程序說(shuō)明]

    本程序能從1至n(n<1000)的自然數(shù)中取r個(gè)數(shù)的所有組合,并按指定的格式輸出其結(jié)果.例如,n=5,r=3時(shí),共有10種組合(見(jiàn)下面左邊列表),而程序?qū)?/FONT>

    下面右邊列表形式輸出(每一行前有一空格).

    10種組合 程序輸出形式

combinations:

1,2,3 1 2 3

1,2,4 4

1,2,5 5

1,3,4 3 4

1,3,5 5

1,4,5 4 5

2,3,4 2 3 4

2,3,5 5

2,4,5 4 5

3,4,5 3 4 5

   [程序]

program comnr(input,output);

var n,r:integer;

blank:boolean;

proecdure combination(s,j:integer);

var i:integer;

begin

for i:= _____________ to n-j+1 do

begin

if ____________ then write (' ':______________*3+1);

write (i:3); blank:=false;

if ___________________ then

combination (______________)

else begin

writeln;

______________________

end

end

end;

begin writeln('ENTER N,R.');

readln(n,r); blank:=true;

writeln('combinations:');

combination(1,r)

end.

上一頁(yè)  [1] [2] 

轉(zhuǎn)帖于:軟件水平考試_考試吧
文章搜索  
看了本文的網(wǎng)友還看了:
軟件水平考試權(quán)威輔導(dǎo)教材: 訂書(shū)電話(huà):010-62168566  更多>>>
網(wǎng)友評(píng)論
昵 稱(chēng): *  評(píng) 分: 1分 2分 3分 4分 5分
標(biāo)題:   匿名發(fā)表    (共有條評(píng)論)查看全部評(píng)論>>
版權(quán)聲明 -------------------------------------------------------------------------------------
  如果軟件水平考試網(wǎng)所轉(zhuǎn)載內(nèi)容不慎侵犯了您的權(quán)益,請(qǐng)與我們聯(lián)系,我們將會(huì)及時(shí)處理。如轉(zhuǎn)載本軟件水平考試網(wǎng)內(nèi)容,請(qǐng)注明出處。
關(guān)于本站  網(wǎng)站聲明  廣告服務(wù)  聯(lián)系方式  付款方式  站內(nèi)導(dǎo)航  客服中心  友情鏈接  考試論壇  網(wǎng)站地圖
Copyright © 2004-2008 考試吧軟件水平考試網(wǎng) All Rights Reserved    
中國(guó)科學(xué)院研究生院權(quán)威支持(北京) 電 話(huà):010-62168566 傳 真:010-62192699
百度大聯(lián)盟黃金認(rèn)證  十佳網(wǎng)絡(luò)教育機(jī)構(gòu)  經(jīng)營(yíng)許可證號(hào):京ICP060677
主站蜘蛛池模板: 一级 黄 色 片免费 一级 黄 色 毛片 | 国产精品激情丝袜美女 | 免费三级网站 | 免费又黄又硬又大爽日本 | 五月天婷婷免费观看视频在线 | 国产男女猛烈无遮挡 | 激情五月激情 | 男女在线观看视频 | 一个人免费播放在线视频看片 | 日韩精品国产一区 | 大美香蕉伊在看欧美 | 亚洲手机国产精品 | 性色生活片在色在线观看 | 成人免费看吃奶视频网站 | 99在线精品视频在线观看 | 亚洲成人网在线播放 | 亚欧乱亚欧乱色视频免费 | 首页 动漫 亚洲 欧美 日韩 | 日韩 欧美 综合 在线 制服 | 欧美精品videosex极品 | 日韩三级中文字幕 | 天天摸天天爽天天碰天天弄 | 欧美激情在线精品video | 亚洲视频中文 | 欧美日韩国产不卡在线观看 | 日批软件在线观看 | 最近2019好看中文字幕 | 中文精品久久久久国产网址 | 精品精品国产理论在线观看 | 欧美二区在线观看 | 亚洲国产第一区二区香蕉 | 私人毛片 | 亚洲h在线观看 | 东京加勒比中文字幕波多野结衣 | 久久成人综合网 | 一级做a爰片性色毛片16美国 | 最新日本免费一区二区三区中文 | 97国产伦子在线观看 | 新一级毛片国语版 | 成年人免费在线播放 | 一区二区三区四区在线观看视频 |