WITCH PROGRAMMING EXERCISES
1. Compute and printout a table of X, X2, X3, for the range of values of X in Demonstration Program 1.
2. Evaluate and print out in a single column the sums of consecutive terms of the G.P. whose first term is 1 and common ratio 3/7.
S1 = 1, S2 = 1 + 3/7, S3 = 1 + 3/7 + (3/7)2, etc.
Stop the program after S6 has been printed.
3. Evaluate and print the successive approximations to ?A given by substituting in the formula :
X2 = 1/2(X1 + A / X4)
where X2 is a better approximation to ?A than X1.
Stop the program when two successive approximations differ by less than 0.000005.
4. The Fibonacci Numbers are 1, 1, 2, 3, 5, 8, 13, 21, etc., each number being the sum of the two preceding numbers.
The ratio of consecutive Fibonacci Numbers tends to the Golden Mean as the Numbers get larger.
Demonstrate this property by computing and printing:
F1 F2 F2/F1
F3 F4 F4/F3
F5 F6 F6/F5 etc.
Put F1 and F2 on tape in the form +00000001.
Stop the program when 14 ratios have been printed.
5. Print out all the pairs of the digits 1 to 4, omitting the pairs in which the digits are equal. Put the digits in separate stores and print in two columns.
6. Print out the pairs of numbers in exercise 5 omitting also the pairs in which the digits differ by more than 2.
