Functions Exercise
Functions Exercise
Example:
Result: 27
2. Write a C++ functions to sort 10 integer values, or 10 long values, or 10 double values.
3. Write a C++ program with a function that receives a factor and will output the multiplication
table as shown below:
3*1=3
3*2=6
3*3=9
3 * 4 = 12
3 * 10 = 30
4. Modify the problem in #3, such that it will generate random number as a factor from 1-10, and
call the function that receives a factor and will output the multiplication table as shown below:
Random factor: 5
5*1=5
5 * 2 = 10
5 * 3 = 15
5 * 4 = 20
.
.
5 * 10 = 50
5. Modify the problem in #4, such that it will generate random number as a factor from 10-99, and
call the function that receives a factor and will output the multiplication table as shown below:
Random factor: 33
33 * 1 = 33
33 * 2 = 66
33 * 3 = 99
33 * 4 = 132
.
.
.
33 * 10 = 330