Your program is fundamentally correct, but it could be written in a much better way, like cire's. But I suppose that might be confusing if you started only a week ago.
One thing you can remove are the parenthesis from the condition in the for statements. For this kind of condition you don't need them
Also, since you know beforehand that some loops will be executed only once, like
1 2 3 4 5 6
for(a=1;(a<2);++a) // will be executed only once
You can remove them
You mark will depend on if the teacher just cares that the output is correct
One of the concepts in programming is to recognise patterns and sequences.
In the required output, the pattern is quite clear to see, even at a glance, though it may become clearer after a little more thought.