在线现看午夜福利片|女人16久久免费视频|鲁丝片一区鲁丝片二区鲁丝|一区二区三区欧美在线

  1. 
    
    <b id="glvx9"></b>
        1. <blockquote id="glvx9"><meter id="glvx9"></meter></blockquote>
            查看全部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