COM 1100 Professor Fell Quiz 4A Solution

Use the windows below to show the output of the following code:
(The grid boxes are 20 pixels apart.)

Problem 1
8
4
2
1

3
10
5
16
8
4
2
1

Problem 2

1 1 5
2 2 4
3 4 8
4 8 16
5 16 32

Press Return To Continue 

Problem 3

Problem 4.

double Average(int x, int y){
	return (x + y) / 2;
}
This function could also return a float or int.


Last Updated: October 19, 1997 9:29 am by
Harriet Fell
College of Computer Science, Northeastern University
360 Huntington Avenue #161CN,
Boston, MA 02115
Internet: fell@ccs.neu.edu
Phone: (617) 373-2198 / Fax: (617) 373-5121
The URL for this document is: http://www.ccs.neu.edu/home/fell/COM1100/QUIZ/Q4ASolution.html