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

Write a function to perform the substraction of two numbers. Eg: char N1="123", N2="478", N3=-355(N1-N2).

804


What is stream and its types in c++?

759


write a c++ program to create class student having datamember name,Roll_no,age,and branch intilcization all the member using constructor print the all the details on the screen.

2452


Is rust better than c++?

818


What are shallow and deep copy?

832


What is an inclusion guard?

844


Declare a class vehicle and make it an abstract data type.

723


What is the difference between a pointer and a link in c ++?

768


Why do we need function?

780


What are the advantages of using typedef in a program?

851


What is a binary file? List the merits and demerits of the binary file usagein C++.

947


How do you differentiate between overloading the prefix and postfix increments?

799


What are smart pointers?

1217


What ANSI C++ function clears the screen a) clrscr() b) clear() c) Its not defined by the ANSI C++ standard

785


Is vector a class in c++?

787