2009年3月23日 星期一

Lab 12 : Fibonacci

List the first 100 numbers and the ratio of
a number to its previous number, such as 1/1 = 1, 2/1 = 2, 3/2 = 1·5, 5/3 = 1·666..., 8/5 = 1·6, 13/8 = 1·625, 21/13 = 1·61538....

Want to know more about Fibonacci number

最後答案會趨近於1.618033988749895


2009年3月21日 星期六

Homework 5

1. Project 7 of Chap. 3

for n=1 and n=10

for n=50 and n=100

2. Write a program to generate the following table of arithmetic expressions

1*1=1 1*2=2 1*3=3 ... 1*9=9
2*1=2 2*2=4 2*3=6 ... 2*9=19
...
9*1=9 9*2=18 9*3=27 ... 9*9=81

2009年3月16日 星期一

Lab 11 : Finding the max of a list of numbers

Based on your study of Display 3.8, write a code to find the max and min of a list of number.
For example, given 1,3,5, and9, the max is 9 and the min is 1.
Your program should be able to process a list of any length.

Lab 10 : Finding the max of three numbers

Write a program to decide the max number of the three input number.

Lab 9 : Tax Calculation

Study Display 3.1. Based on the income tax rate in Taiwan,
calculate the income tax of a person whose annual income is 1,000,000 or 2,000,000.

2009年3月15日 星期日

Homework 4

1. Do Project 4 in Chapter 2


2. Do Project 5 in Chapter 2


3. Do Project 6, in Chapter 2


4. Do Project 7, in Chapter 2

2009年3月9日 星期一

Lab 8: Keyboard precessing

Project 3 of Chap. 2.