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 a c++ program that gives output
4
3 4
2 3 4
1 2 3 4 using looping statement

Answer Posted / rajesh

4
3 4
2 3 4
1 2 3 4

#include<stdio.h>

int main()
{
int i, j, n=4;

for(i=n; i>=1; i--)
{
for(j=i; j<=n; j++)
{
printf("%d",j);
}
printf("\n");
}
printf("\n");
}

Is This Answer Correct ?    32 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain bubble sorting.

1026


Explain public, protected, private in c++?

961


Why can templates only be implemented in the header file?

1061


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

913


What are the important differences between c++ and java?

1091


What is meaning of in c++?

1150


Describe new operator?

1097


Define Virtual function in C++.

1039


How can an improvement in the quality of software be done by try/catch/throw?

1007


What is binary object model?

969


What are the rules for naming an identifier?

1017


What do nonglobal variables default to a) auto b) register c) static

1100


What do you mean by stack unwinding in c++?

1183


Explain what happens when a pointer is deleted twice?

1195


Is it legal in c++ to overload operator++ so that it decrements a value in your class?

1009