Monday, May 21

Generate Interesting Patterns Using C

Hi friends,

Look at the "+"  pattern generated by asterisks. Quite interesting na..!! :)
Lets have a look in a C program which generates exactly the same pattern.!!!!!

 main()
{
int i,j;
for ( i= 0; i < 11; ++i)
{
for ( j = 0; j < 11; ++j)
      if (j != 5 && i !=5 )
     printf(" "); 
      else printf ("* ");
printf("\n");
}
}



3 comments :

Unknown said... Best Blogger Tips [Reply to comment] Best Blogger Templates
This comment has been removed by the author.
Unknown said... Best Blogger Tips [Reply to comment] Best Blogger Templates

plz include more patterns

Unknown said... Best Blogger Tips [Reply to comment] Best Blogger Templates

plz include more patterns

Post a Comment