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
How many keywords are used in c++?
What is a class template?
What is the use of endl?
What are enumerations?
What is setw manipulator in c++?
When can I use a forward declaration?
What is the v-ptr?
What are the advantages of using const reference arguments in a function?
Who calls main function?
Explain what are single and multiple inheritances in c++?
Explain all the C++ concepts using examples.
What is the best c++ compiler?
What is the difference between passing by reference and passing a reference?
What is #include iostream h in c++?
What is the cout in c++?