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


Please Help Members By Posting Answers For Below Questions

What are the benefits of pointers?

978


Is c++ platform dependent?

1030


If you push the numbers (in order) 1, 3, and 5 onto a stack, which pops out first a) 1 b) 5 c) 3

1313


Can we specify variable field width in a scanf() format string? If possible how?

1147


What is the difference between new() and malloc()?

1914


Name four predefined macros.

989


How a new operator differs from the operator new?

1054


What is the object serialization?

1090


What is the advantage of an external iterator.

975


What are move semantics?

1077


What is the need of a destructor?

1062


Can java be faster than c++?

1101


Write down the equivalent pointer expression for referring the same element a[i][j][k][l]?

1190


Why do we use classes in c++?

994


How is modularity introduced in C++?

1148