67 069
Assignments Done
99,3%
Successfully Done
In November 2018

Answer to Question #6538 in C++ for Rikayla

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
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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions