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

查看全部128種考試
軟件水平考試
 考試動態(tài) 報考指南 歷年真題 模擬試題 復(fù)習(xí)資料 心得技巧 專業(yè)英語 技術(shù)文章 軟考論壇 考試用書
 程序員 軟件設(shè)計師 網(wǎng)絡(luò)管理員 網(wǎng)絡(luò)工程師 系統(tǒng)分析師 數(shù)據(jù)庫系統(tǒng)工程師
1
2
3
4
5
6
7
8
9
10
xihuyu2000  
【字體: 1989年程序員考試試題下午試題
1989年程序員考試試題下午試題
spks.exam8.com 來源:考試吧(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個元素按key遞增排序,本過程的過程體省略}

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

    [程序說明]

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

上一頁  [1] [2] 

轉(zhuǎn)帖于:軟件水平考試_考試吧
文章搜索  
看了本文的網(wǎng)友還看了:
網(wǎng)友評論
昵 稱: *  評 分: 1分 2分 3分 4分 5分
標(biāo)題:   匿名發(fā)表    (共有條評論)查看全部評論>>
版權(quán)聲明 -------------------------------------------------------------------------------------
  如果軟件水平考試網(wǎng)所轉(zhuǎn)載內(nèi)容不慎侵犯了您的權(quán)益,請與我們聯(lián)系,我們將會及時處理。如轉(zhuǎn)載本軟件水平考試網(wǎng)內(nèi)容,請注明出處。
關(guān)于本站  網(wǎng)站聲明  廣告服務(wù)  聯(lián)系方式  付款方式  站內(nèi)導(dǎo)航  客服中心  友情鏈接  考試論壇  網(wǎng)站地圖
Copyright © 2004-2008 考試吧軟件水平考試網(wǎng) All Rights Reserved    
中國科學(xué)院研究生院權(quán)威支持(北京) 電 話:010-62168566 傳 真:010-62192699
百度大聯(lián)盟黃金認(rèn)證  十佳網(wǎng)絡(luò)教育機(jī)構(gòu)  經(jīng)營許可證號:京ICP060677
主站蜘蛛池模板: 亚洲欧美日韩综合在线 | 欧美小视频在线 | 国产一区二区视频在线观看 | 欧美日本视频在线观看 | 免费的黄色毛片 | 婷婷免费高清视频在线观看 | 大又黄又粗又爽妇女毛片 | 国产欧美精品国产国产专区 | 日本肥妇 | 欧美日韩一区二区视频免费看 | 天天干天天骑 | 97色在线观看免费视频 | 在线观看国产高清免费不卡黄 | 视色在线 | 黄色网毛片 | 国产视频一区二 | 丝袜美腿综合 | 黄色香蕉视频网站 | 看全色黄大色黄大片女图片 | 国产免费一级高清淫曰本片 | 丝袜制服国产 | 免费涩涩漫画大全 | 成人三级黄色片 | 欧美亚洲福利 | 免费一级a毛片在线播 | 日韩国产欧美在线观看 | 97精品国产高清久久久久蜜芽 | 91深夜福利| 日韩欧美一级大片 | 中文字幕免费播放 | 国产一区中文字幕在线观看 | 国产com | 成人黄18免费网站 | 99视频在线免费看 | 日韩精品福利视频一区二区三区 | 成年网站免费视频黄 | 色天网站 | 天天摸天天做天天爽水多 | 在线亚州| 午夜影放免费观看 | 天天做日日爱 |