1. Write C++ expressions for the following:
Example: For "p equals 5" you would write "p = = 5".
x > 7
(y > 9) && (y < 16) or (y >= 9) && (y <= 9)
(z <= 0) || (z > 100)
2. Write C++ code that uses two for loops (one inside the other) to
3. Given two integers x and y where x = 110111012 and y = 101010102, what is:
10001000
11111111
10000111
00110011
00011011
4. Fibonacci numbers are a sequence of numbers discovered by Fibonacci around 800 years ago.
Given an array as follows:
Write a C++ code fragment (i.e. not a whole program) that fills the array with the first
50 Fibonacci numbers, stopping when all 50 Fibonacci numbers have been computed
or when a Fibonacci number has been computed that is greater than MAXINT/2.
[Note: MAXINT is a constant defined in values.h]
Hint: start by setting the first two elements of the array, then use a for loop to compute the rest.