|
|
·
Create
an apvector class with initial fill values of 0-(See Apvector Ditto)
·
Fill
this safe array of 15 places with the first 15 perfect squares (1, 4, 9,16..)
·
This
must be done in a function where you pass by reference.
·
Prototype: void perf_sqr (apvector<int> &
num);
·
Call
a second function that will print them out as follows:
OUTPUT:
Safe array of 15 perfect squares
{1:1,
2:4, 3:9, 4:16, 5:25, 6:36, 7:49, 8:64, 9:81, 10:100, 11:121, 12:144, 13:169,
14:196, 15:225}
|
|