精品偷拍一区二区三区,亚洲精品永久 码,亚洲综合日韩精品欧美国产,亚洲国产日韩a在线亚洲

  • <center id="usuqs"></center>
  • 
    
  • 求一道題目的算法偽代碼

    求一道題目的算法偽代碼
    A company handles international messages. Currently, the messages are printed onto
    a continuous strip of paper which is cut up and pasted onto sheets of paper for delivery.
    The owner of the company has decided to automate this process, printing the messages
    directly onto sheets of paper. Your task is to develop a pseudo code algorithm to achieve
    this purpose. The owner can tell you the following things:
    1. The incoming message arrives in the form of a series of one or more blocks of data.
    2. The outgoing message will be produces as a series of pages.
    3. Each page may contain up to 60 lines.
    4. Each line can contain up to 100 characters.
    5. Words may not be split across lines.
    6. As many words as possible must be fitted onto each line.
    7. Each message must start on a new page.
    8. You have 3 sub-programs already provided.
    a. getBlock which fills an array with the next incoming block of text.
    b. putLine which prints the next line of text onto the page.
    c. putPage which ejects the current page and starts the next.
    9. Each block can hold up to 500 characters.
    10. The end of a block is designated by the character ‘#’.
    11. The 500 character limit includes the end of block character.
    12. The end of a message is designated by an empty block.
    13. An empty block consists of a one-character long block containing ‘#’.
    14. The character ‘#’ only appears as the end of a block.
    15. A message consists of a series of words.
    16. Words are separated by spaces, sequences of one or more occurrences of the ‘ ’
    character.
    17. The alphabet consists of the capital letters ‘A’ to ‘Z’ , the space ‘ ’ and the hash ‘#’.
    18. Numbers and punctuation are spelled out
    19. On arrival, the first word of a message may have spaces before it.
    20. On arrival, the last word of a message may be followed by spaces.
    21. On Arrival, there may be multiple spaces between words.
    22. Blocks may consist entirely of spaces.
    23. On arrival, words may be split between blocks.
    24. On output there must be no space before the first word on any line
    25. On output there will be no more than 1 space between words
    26.No word in the message will be longer than 100 characters.
    You should create a solution in which the Algorithm is clear and easily tested.
    Use the principles of top-down design and modular programming.
    Select one of the sub-algorithms you create and provide a detailed flow chart for it following
    the rules and conventions taught in class.
    給出了26個條件,讓寫偽代碼,不要求有全部答案,有個大概思路就好
    英語人氣:661 ℃時間:2020-05-17 09:28:54
    優(yōu)質(zhì)解答
    這道題我包了,其他人速速退散.明天告訴你答案.當(dāng)然只是思路,我從來都是給人漁,而不是魚.我睡好了,現(xiàn)在來回答你的問題,感謝樓上的支持!順便感慨一下老外出的題就是高明,我上學(xué)時候沒有這么好的題來引導(dǎo)學(xué)生.先看題目,...
    我來回答
    類似推薦
    請使用1024x768 IE6.0或更高版本瀏覽器瀏覽本站點,以保證最佳閱讀效果。本頁提供作業(yè)小助手,一起搜作業(yè)以及作業(yè)好幫手最新版!
    版權(quán)所有 CopyRight © 2012-2024 作業(yè)小助手 All Rights Reserved. 手機版