COM 1100 Professor Fell Quiz 4B Solution

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

Problem 1
4
2
1

21
64
32
16
8
4
2
1

Problem 2

1    2    3
2    4    6
3    8    9
4    16   12
5    30   15

Press Return To Continue 

Problem 3

Problem 4.

bool IsEven(int N){
	if (N%2 == 0)
		return true;
	else
		return false;
}
or
bool IsEven(int N){
	return (N%2 == 0);
}


Last Updated: December 5, 1997 1:54 pm 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/Q4BSolution.html