Answer L33


#include <stdio.h>

void starLine( int n )
{
  int j;
  for ( j=0; j<n; j++ )
    putchar('*');
  putchar('\n');
}

void starBlock( int r, int c )
{
  int j;
  for ( j=0; j<r; j++ )
    starLine( c );
}

int main()
{
  starBlock( 5, 7 );  
  return 0;
}

Comments: You could also use printf("*") in the above.



Back to Puzzle Home