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


Please Help Members By Posting Answers For Below Questions

How many keywords are used in c++?

1069


What is a class template?

1140


What is the use of endl?

1039


What are enumerations?

1153


What is setw manipulator in c++?

1128


When can I use a forward declaration?

1145


What is the v-ptr?

1218


What are the advantages of using const reference arguments in a function?

1122


Who calls main function?

1168


Explain what are single and multiple inheritances in c++?

1074


Explain all the C++ concepts using examples.

1254


What is the best c++ compiler?

1227


What is the difference between passing by reference and passing a reference?

1139


What is #include iostream h in c++?

1225


What is the cout in c++?

1110