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 is meant by iomanip in c++?

1192


What are the benefits of oop in c++?

1208


What is command line arguments in C++? What are its uses? Where we have to use this?

1253


Does c++ have a hash table?

980


What is a class template in c++?

1039


How do you establish a has-a relationship?

1092


How to tokenize a string in c++?

1043


What is &x in c++?

978


How can I improve my c++ skills?

1112


What is the difference between the functions memmove() and memcpy()?

1102


Write a program that takes a 5 digit number and calculates 2 power that number and prints it.

2563


Is c++ free?

1087


Write a recursive program to calculate factorial in c++.

1058


Describe exception handling concept with an example?

1040


Which header file allows file i/o with streams a) fileio.h b) iostream.h c) fstream.h

1123