modified the patterns2.c
modified the patterns2.c