write the code that display the format just like
1
2 1
3 2 1
4 3 2 1
5 4 3 2 1
6 5 4 3 2 1

Answer Posted / prasenjit roy

int main()
{
int i;
int j;
for(i = 1; i <= 6; i++)
{
for(j = i; j >= 1; j--)
cout<<j<<" ";
cout<<endl;
}
return 0;
}

Is This Answer Correct ?    4 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can I make ios apps with c++?

658


What is buffer and example?

614


What are the restrictions apply to constructors and destructors?

733


How const int *ourpointer differs from int const *ourpointer?

693


Differentiate between declaration and definition.

680






What things would you remember while making an interface?

666


Write a program that takes a 5 digit number and calculates 2 power that number and prints it.

2161


Write a program to find the Fibonacci series recursively.

710


Does c++ vector allocate memory?

630


What is a driver program?

712


Can create new c++ operators?

655


What are vectors used for in c++?

705


Explain about vectors in c ++?

681


What is the size of integer variable?

688


What is decltype c++?

637