Answer to Question #6538 in C++ for Rikayla

2012-02-14T08:00:58-0500

Question #6538

I am trying to make a program that prints a certain pattern of stars using for statements and cannot figure out what is wrong with that I have so far. Everytime I fix one of my errors, more errors come up.

int col = 0; int row = 0;

for(row<10); { if(col<10); continue else print("\n"; col=0; row++;) }

for { if(col<row; col++) printf(" "); else printf("*"); }

Expert's answer

2012-02-16T07:24:36-0500

You need to deal clearly with the c++ syntaxis (for loops, if statements).