Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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

What is the type of 'this' pointer? When does it get created?

944


Where and why do I have to put the "template" and "typename" keywords?

1017


Of the numbers 12 23 9 28 which would be at the top of a properly implemented maxheap a) 28 b) 9 c) Any of them could be

1403


Does there exist any other function which can be used to convert an integer or a float to a string?

1068


What is pure virtual function? Or what is abstract class?

1039


Can you pass a vector to a function?

968


Why isn't sizeof for a struct equal to the sum of sizeof of each member?

979


What is time_t c++?

1112


What is a singleton class c++?

1009


How do you clear a map in c++?

1115


What are the five basic elements of a c++ program?

1098


Does c++ have finally?

1015


What is data abstraction? How is it different from data encapsulation?

986


What is the maximum combined length of command line arguments including the space between adjacent arguments?

987


What are the restrictions apply to constructors and destructors?

1071