Answer to Question #4286 in C++ for kuldeep
Write a program to produce following design by using "for" loop.
& & & & & & &
& & & & &
& & &
&
1
2011-10-06T08:37:48-0400
#include <iostream>
using namespace std;
int main()
{
int i, j;
for (i=0; i<4; ++i)
{
for (j=0; j<i; ++j)
cout<<" ";
for (j=0; j<6-2*i; ++j)
cout<<"& ";
cout<<"&"<<endl;
}
system("pause");
return 0;
}
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