|
|
Assignment 2 |
|
The resulting output should look something like the following.
0.000000
2.000000
6.000000
12.000000
20.000000
30.000000
42.000000
56.000000
72.000000
90.000000
Note that you probably will get casting errors in this program. You can
ignore them at the moment and so will we. If you want to fix it then you
should put (float) before ints that you would like transformed
and this will tell the compiler that you intend for it to do the conversion
for you.