Where did I use decimal Points in my code? As far as I see: nowhere. Typing in p[2], p[4], ... and so on yields 0 even though it shouldn't. It should rather calculate something larger than 0.
"Where did I use decimal Points in my code? As far as I see: nowhere."
"a[1, k] = (k - 2)*0.1;" <--- There.
Any time anything with a decimal point is combined with anything else the result will then have a decimal point. (Well almost any)
Use integers or fractions, but nothing with decimal points, to avoid this problem.
There are other, but much higher, limits on the ability to calculate exact values without decimal points, but you may never encounter those in your work.