/* PrintTriangle.c - Program to print * characters on the screen in the * shape of a triangle. * * Author: Bill Kirby #define MAXLINES 6 int main(void) { char splat = '*'; int lineCount = 1, splatCount = 0; do { for(splatCount=1; splatCount<=lineCount; splatCount=splatCount+1) { printf("%c", splat); } printf("\n"); lineCount = lineCount + 1; } while(lineCount <= MAXLINES); return 0; }