Exercises, grades, handouts, sample exam.
Please remember to write your full name and i.d. number on every exercise.
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).
For a detailed explanation on how to print demo executions of your program press here.

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

Due: 7/1/1999

Exercise 3: for loops

Due: 7/1/1999

Exercise 4: loops, random numbers

Due: 14/1/1999

Remark: Use the functions random() and randomize() instead of rand() and srand().
Here is an example program using these functions:

#include "iostream.h"
#include "stdlib.h"
#include "time.h"

void main(void)
    int i,num;

    cout << "Here are some random numbers between 7 and 40:\n";
    for (i=1; i<=10; i++)
        num = 7 + random(34);
        cout << num << endl;

Exercise (Word). 
  • Exercise (Postscript). 
  • Exercise (Postscript,Word).
  • Exercise (Word).

  • Back to Course Home Page.

    Last modified: Wed, Feb 17 1999