Answer to Question #6538 in C++ for Rikayla
2012-02-14T08:00:58-05:00
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("*");
}
1
2012-02-16T07:24:36-0500
You need to deal clearly with the c++ syntaxis (for loops, if statements). int col = 0; int row = 0; void main(){ for(row=0;row<10;row++){ & if(col<10) & continue; & else { cout<<"\n"; & col=0; & row++; & } } for("put the arguments") { & if(col<row) { & col++; & printf("="" "); & } & else & printf("*"); }
Need a fast expert's response?
Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS !
Learn more about our help with Assignments:
C++
Comments
Leave a comment