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 / bhushan

#include<iostream.h>
void main()
{
for(int i=1;i<=6;i++)
{
for(int j=i;j>=1;j--)
{
cout<<j<<"\t";
}
cout<<"\n";
}
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How is objective c different from c++?

875


What is constructor in C++?

723


What is setf in c++?

708


What are the four main data types?

662


What is the this pointer?

717






What is stl containers in c++?

673


What is runtime errors c++?

673


What do manipulators do?

665


What is the difference between delegation and implemented-in-terms-of?

629


How c functions prevents rework and therefore saves the programers time as wel as length of the code ?

722


Keyword mean in declaration?

677


Define stacks. Provide an example where they are useful.

675


Mention the purpose of istream class?

702


What is the difference between strcpy() and strncpy()?

732


What is the need of a destructor? Explain with the help of an example.

661