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 do I write a c++ program?

1051


What do you mean by const correctness?

1031


What is difference between c++ 11 and c++ 14?

1012


Explain the difference between struct and class in terms of access modifier.

1130


How many types of classes are there in c++?

985


How one would use switch in a program?

1025


Write a Program for dynamically intialize a 2 dimentional array. Eg:5x20, accept strings and check for vowels and display the no.finally free the space allocated .

1090


Explain "const" reference arguments in function?

998


What do c++ programmers do?

1012


What is the disadvantage of using a macro?

1051


What are the four partitions in which c++ compiler divides the ram?

1167


Explain the static storage classes in c++.

1195


What is extern c++?

944


Inline parameters : What does the compiler do with the parameters of inline function, that can be evaluated in runtime ?

2450


Is main a class in c++?

961