Anyone know Visual Basic programming? As a console application: I need to write
ID: 3609213 • Letter: A
Question
Anyone know Visual Basic programming? As a console application: I need to write a program in VB that displayspatterns. One below the other. The patterns are asfollows: There are four of them * ** *** **** ***** ****** and ****** ***** **** *** ** * and ****** ***** **** *** ** * and * ** *** **** ***** ****** All asterisks(*) should be printed by a single statement cout << * causing the asterisks to print side by side. A singlestatement for the next line position. and a statement of ttodisplay the blank spaces for the last two patterns. There should be no other output statements in theprogram. Maximize use of repetition (with nested For ....Nextstatements) I don't know where to begin Help Anyone know Visual Basic programming? As a console application: I need to write a program in VB that displayspatterns. One below the other. The patterns are asfollows: There are four of them * ** *** **** ***** ****** and ****** ***** **** *** ** * and ****** ***** **** *** ** * and * ** *** **** ***** ****** All asterisks(*) should be printed by a single statement cout << * causing the asterisks to print side by side. A singlestatement for the next line position. and a statement of ttodisplay the blank spaces for the last two patterns. There should be no other output statements in theprogram. Maximize use of repetition (with nested For ....Nextstatements) I don't know where to begin HelpExplanation / Answer
please rate - thanks This good? #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;
}
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.