2.1 Write a program that reads a file of integers and outputs the differences of successive integers to a new file.
2.2 Exercise 2.16 in the textbook.
2.3 Exercise 2.5 in the textbook.
2.4 Prove that the 'for', 'do while' and 'while' constructs are equivalent in the sense that any sequence of actions performed by using one of these constucts can also be performed by using any other.
2.5 The guessing game problem: Write a program that works as follows - it first takes in a positive integer N as input. It then generates a random number r between 0 and N (using the rand() library function). The program then attempts to find the value of r by generating a series of questions of the form "Is r <= k?" or "Is r>= k?" where k is independent of r and answering them by comparing the values of r and k. The program should output r and the number of questions it takes to find r.