Please remember to write your full name and i.d. number on every
You may submit the exercises anytime before the due date to the mailbox
of the T.A. or submit it in class.
(T.A.: Daher Kaiss, mailbox in Schreiber 1st floor).
a detailed explanation on how to print demo executions of your program
Exercise 1: Introduction
Due: 24/12/1998 (postponed to 31/12/98
due to system problems)
Do not forget to use meaningfull identifier-names and explanatory comments.
Exercise 2: if-else,switch,while
Exercise 3: for loops
Exercise 4: loops, random numbers
Remark: Use the functions random()
and randomize() instead of rand()
Here is an example program using these functions:
cout << "Here
are some random numbers between 7 and 40:\n";
for (i=1; i<=10;
num = 7 + random(34);
cout << num << endl;
Exercise 5: Arrays, Functions
Remark: in exercise 3, there is a typo: the function
double sin(double) should not be there at all... (it was copied
accidentally from the next exercise).
Exercise 6: Recursion, Strings
Due: 11/2/1999 (posponed by a week)
Remark: Another typo! (how can we do without one...):
if ((r = p %
q) == 0) instead
of whatever is written on your exs.
you can pass beginning-index
of the sub-array that you wish to sort / merge as parameters to a recursive
Exercise 7: More of the same
Exercise 8: Pointers
Back to Course
Last modified: Wed, Feb 17 1999