1 / 5

本次作業有三題分別計分 -- C 語言練習題 due date: 2010/12/21

本次作業有三題分別計分 -- C 語言練習題 due date: 2010/12/21. 2010/12/9. 程式練習 1. 1. PREFIX SUM 計算 : 題目:利用一維陣列 sum[100] 和 FOR LOOP 計算 1 到 100 的 PREFIX SUM, 存回 sum[100] 相對整數陣列位置 結果 : 計算 prefix sum: 輸出 sum[100] 全部內容 for(i=0;i<100;i++){ sum[i] = ???; } FOR ( 1 to 100 )

Download Presentation

本次作業有三題分別計分 -- C 語言練習題 due date: 2010/12/21

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 本次作業有三題分別計分 --C語言練習題due date: 2010/12/21 2010/12/9

  2. 程式練習1 • 1. PREFIX SUM 計算: • 題目:利用一維陣列 sum[100] 和 FOR LOOP 計算 1 到 100 的 PREFIX SUM, 存回sum[100]相對整數陣列位置 • 結果: 計算prefix sum: 輸出sum[100] 全部內容 • for(i=0;i<100;i++){ • sum[i] = ???; • } • FOR ( 1 to 100 ) • sum[0] = 1 • sum[1] = 1+2 • sum[2] = 1+2+3 • sum[99] = 1+ .. +100

  3. 程式練習2 • 2. 寫一程式以scanf()讀入任意字串(小於10),到一字串陣列a[],在字串字元間各插入一空格,放到字串陣列b[],然後列印字串陣列b • Eg. char a[15] = “ABD”; char b[30] length = strlen(string);

  4. 程式練習3 • 3. 輸入英文字母(小於30個) • 輸出反向字母 • Eg. Abc cbA • FHZ  ZHF

  5. 本課程作業列表 • Hw1. 分組上台和報告(10%) • 其餘到期末的作業共(20%) • Ex1. 數字系統小考 • Hw2. 三個數字排序 (PERL) • Hw3. 要買幾包乖乖? • Hw4. 費氏數列 • Hw5. 2x2陣列相乘 • Hw6,7,8. 本練習題 • [注意:12/22 ,是補交的最後期限,但補交仍然會扣一定分數]

More Related