# Answer to Question #4052 in C++ for kuldeep

Question #4052

Write a program to produce design usibg nested loop& & & & & & &

& & & & &

& & &

&

& & & & &

& & &

&

Expert's answer

#include <iostream>

int main()

{

int i,j;

int n=7; // an ODD number of & in the first line

for(i=0; i<n/2+1; i++) {

for(j=0; j<i; j++) {

std::cout << " ";

};

for (j=i; j<n-i-1; j++) {

std::cout << " quot;;

};

std::cout << "&" << std::endl;

};

};

int main()

{

int i,j;

int n=7; // an ODD number of & in the first line

for(i=0; i<n/2+1; i++) {

for(j=0; j<i; j++) {

std::cout << " ";

};

for (j=i; j<n-i-1; j++) {

std::cout << " quot;;

};

std::cout << "&" << std::endl;

};

};

Need a fast expert's response?

Submit orderand get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

## Comments

## Leave a comment