If you want to avoid a lot of repetition and "magic numbers" in your code, you might want to think about computing the 'first', 'second', .. variables in terms of ROW and COL. You also might want to think about not duplicating code that prints the same pattern (like your example pattern has two repeated patterns (lower triangle, upper triangle, lower triangle, upper triangle). A hint is to use the integer modulus operator % and the integer division /.
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
alwaysLearning0 commented: nice +5
kvprajapati commented: Many thanks! awesome :) +15
Ancient Dragon commented: Excellent :) +14
Labdabeta commented: Bookmarked reference page now! +6
Ketsuekiame commented: Totally forgot about X3D as we use in-house formats ^^ +8
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mrnutty commented: I admire your ability to exhaust an answers! +13
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
sergent commented: that explains a lot! Thanks! +5
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
Ancient Dragon commented: good stuff to know :) +17
jonsca commented: Agreed, and nice tutorial +14
Chilton commented: Thanks a lot for the help. +3
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
harryhaaren commented: Good advice, clearly worded +1
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster
mike_2000_17 2,669 21st Century Viking Team Colleague Featured Poster