#include<iostream.h> int main() {int i,j,k; for(j=1;j<7;j++) {for(i=1;i<=j;i++)
ID: 3609239 • Letter: #
Question
#include<iostream.h>int main()
{int i,j,k;
for(j=1;j<7;j++)
{for(i=1;i<=j;i++)
cout<<"*";
cout<<endl;
}
for (j=7;j>0;j--)
{for(i=1;i<j;i++)
cout<<"*";
cout<<endl;
}
for(j=0;j<6;j++)
{for(k=0;k<j;k++)
cout<<" ";
for(i=6;i>j;i--)
cout<<"*";
cout<<endl;
}
for(j=6;j>0;j--)
{for(k=1;k<j;k++)
cout<<" ";
for(i=7;i>j;i--)
cout<<"*";
cout<<endl;
}
system("pause");
return 0;
}
#include<iostream.h>
int main()
{int i,j,k;
for(j=1;j<7;j++)
{for(i=1;i<=j;i++)
cout<<"*";
cout<<endl;
}
for (j=7;j>0;j--)
{for(i=1;i<j;i++)
cout<<"*";
cout<<endl;
}
for(j=0;j<6;j++)
{for(k=0;k<j;k++)
cout<<" ";
for(i=6;i>j;i--)
cout<<"*";
cout<<endl;
}
for(j=6;j>0;j--)
{for(k=1;k<j;k++)
cout<<" ";
for(i=7;i>j;i--)
cout<<"*";
cout<<endl;
}
system("pause");
return 0;
}
Explanation / Answer
please rate - thanks Please rate this answer and all the previousanswers or I no longer answer you questions-I don't like feelinglike I'm wasting my time!! this should get you started it's BASIC which Visual Basic is builton CLS FOR j = 1 TO 6 FOR i = 1 TO j PRINT "*"; NEXT i PRINT NEXT j FOR j = 6 TO 1 STEP -1 FOR i = 1 TO j PRINT "*"; NEXT i PRINT NEXT j FOR j = 0 TO 5 FOR k = 0 TO j - 1 PRINT " "; NEXT k FOR k = 5 TO j STEP -1 PRINT "*"; NEXT k PRINT NEXT j FOR j = 5 TO 0 STEP -1 FOR k = 0 TO j - 1 PRINT " "; NEXT k FOR k = 5 TO j STEP -1 PRINT "*"; NEXT k PRINT NEXT j
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.