#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(int argc, char *argv[]) { starBlock( 5, 7 ); system("PAUSE"); return 0; }
Comments:
You could also use printf("*")
in the above.