I'm not exactly sure on what you're trying to do but I think this may be what you're after. Even if you're only going to have one statement in your for loop, use braces. It improves the codes readability tenfold.
You can't assign anything to a[10]. a[10] is not a valid reference.
You've defined 10 occurrances. Those are a[0]-a[9]. a[10] is out of bounds.
Not clear from your original code which statements you intended to be within the scope of your for loop. As originally written, only line 18 will be executed within your for loop. If you intended lines 18-21 to be executed within the for loop, use {} as sausage suggested. As originally written, lines 19-21 will only be executed once you've exited the for loop. That's also going to cause another problem. When you exit the for loop, a will equal 10, causing you to reference a[10] which is not valid as explained above.