1 / 2

習題 1-1 :

習題 1-1 :. 適當調整下列方程式的 a , b 值 , 其中 -1 < a < 1, -1 < b < 1 ,試以 Turbo C 繪出其圖形 , 並選出 5 張你 ( 妳 ) 覺得最美 , 而與同學不同的圖案:. X n+1 = Y n + F(X n ) Y n+1 = - X n + F( X n+1 ). 其中. 2 X 2. F(X) = a X + (1 – a). 1 + X 2. 註:建議值 a = -0.2, b = 1, 初值 = (x0, y0) = (20, 0), 重覆運算次數.

luke-owen
Download Presentation

習題 1-1 :

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. 習題1-1: • 適當調整下列方程式的 a , b 值, 其中 -1 < a < 1, -1 < b < 1,試以 Turbo C 繪出其圖形, 並選出5 張你(妳)覺得最美, 而與同學不同的圖案: X n+1 = Yn + F(X n) Y n+1 = - X n + F( X n+1) 其中 2 X 2 F(X) = a X + (1 – a) 1 + X 2 註:建議值 a = -0.2, b = 1, 初值 = (x0, y0) = (20, 0), 重覆運算次數 • 交出 :(1) 程式原始碼, (2) 列印出的 5 張你(妳)覺得最美的圖案並註明所選取的a, b 參數值, x , y 的初值, 重覆運算次數及放大倍數。 • 作業截止日期:2003年3 月7日中午12:00 (星期五)。

  2. 習題1-2:cout and function call • (1) 以 Visual C++ 寫函數符合下列規定: • 寫myTitle()函數: 打出班級, 學號 , 姓名. • 記憶體宣告2 個local 變數 lNum1, lNum2, 寫2 個函數, 輸出函數呼叫前後lNum1, lNum2值變化的情形. • int myMult(int , int)函數: 輸入2 個local 變數內容 , 回應該2變數的乘積. • void myMult(int * , int *)函數: 輸入2 個local 變數位址 , 不回應值回來. • 記憶體宣告2 個global 變數 gNum1, gNum2,寫2 個函數,輸出函數呼叫前後gNum1, gNum2,值變化的情形. • int myGmult()函數: 回應該2變數的乘積. • void myMult()函數:不回應值回來. • (2)以 Visual C++ 寫函數符合下列規定: • 寫一函數 PlusFive(), 記憶體內宣告 1 個 static local 變數 sNum, 初值設為1, 該函數內, 將會將sNumber變數的原來值改為5倍 . • 寫一主程式 main() 連續呼叫PlusFive() 3 次, 並打出其內容.

More Related