1. Write a program that uses defined constants for the vowels in the alphabet and
memory constants for the even decimal digits (0, 2, 4, 6, 8). It then prints the
following three lines using literal constants for the odd digits.
a e i o u
0 2 4 6 8
1 3 5 7 9
[20 marks]
2. Write a program that defines five integer variables and initializes them to 1, 10,
100, 1000 and 10000. It then prints them on a single line separated by space
characters using the decimal conversion code (%d), and on the next line with the
float conversion code (%f).
[20 marks]
3. Write a program that extracts and print the second rightmost digit of the integral
portion of a float.
[20 marks]
4. Write a program that calculates the area and perimeter of a rectangle from a
user-supplied (scanf) length and width.
[20 marks]
5. Explain what is meant by the statement “a function should do only one thing.”
[3 marks]