An important learning outcome of the unit is the ability to read and use technical documentation. Students are required to read and be familiar with the reference documentation listed in the 2 sections above.
Exercise 1: Multiplication tables
Write a C program to display multiplication tables from 1 to 20 in columns which are justified and aligned in straight lines.
Following is a sample output display of multiplication tables for 1 and 10.
Tables:
1 x 1 = 1
1 x 2 = 2
1 x 3 = 3
1 x 4 = 4
1 x 5 = 5
1 x 6 = 6
1 x 7 = 7
1 x 8 = 8
1 x 9 = 9
1 x 10 = 10
10 x 1 = 10
10 x 2 = 20
10 x 3 = 30
10 x 4 = 40
10 x 5 = 50
10 x 6 = 60
10 x 7 = 70
10 x 8 = 80
10 x 9 = 90
10 x 10 = 100
Write a C program that accepts a minimum and a maximum value in miles. Then the program displays the list of miles and converted kilometer values starting at the minimum and increasing by 5 miles each step until the maximum value is reached.
The conversion formulas are available at Wikipedia:
Write a C program that accepts a minimum and a maximum value in Celsius. Then the program displays the list of Celsius temperature and converted Fahrenheit values starting at the minimum and increasing by 0.5 Celsius degree each step until the maximum value is reached.
The conversion formulas are available at Wikipedia: