60 331
Assignments Done
98%
Successfully Done
In April 2018

Answer to Question #4286 in C++ for kuldeep

Question #4286
Write a program to produce following design by using "for" loop.
& & & & & & &
& & & & &
& & &
&
Expert's answer
#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!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions