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 / gayatri chhotray
int main()
{
int i;
int j;
for(i = 1; i <= 6; i++)
{
for(j = i; j >= 1; j--)
{
cout<<j<<" ";
}
}
return 0;
}
Is This Answer Correct ? | 4 Yes | 4 No |
Post New Answer View All Answers
Which bit wise operator is suitable for checking whether a particular bit is on or off?
Can we distribute function templates and class templates in object libraries?
How do you sort a sort function in c++ to sort in descending order?
What is runtime polymorphism in c++?
What is basic if statement syntax?
Why is that unsafe to deal locate the memory using free( ) if it has been allocated using new?
Why do we use using namespace std in c++?
What is atoi?
Define Virtual function in C++.
What is data abstraction? How is it different from data encapsulation?
Do you know about C++ 11 standard?
Explain how to initialize a const member data.
How would you differentiate between a pre and post increment operators while overloading?
Can constructor be static in c++?
Explain what are accessor methods?