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

how can i get output the following...
5 4 3 2 1
4 3 2 1
3 2 1
2 1
1

and

1
2 3
4 5 6
7 8 9 10
11 12 13 14 15

plz plz...

Answer Posted / abhishek karnani

void main ()
{
int i,k,j;
clrscr();
for (i=0;i<5;i++)
{

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


}

}

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Here is a neat trick for checking whether two strings are equal

1018


What do you mean by dynamic memory allocation in c? What functions are used?

1163


what are the advantages of a macro over a function?

1141


What is main function in c?

1077


a construct the"else" part of "if" statement contains anoth "if else" statement is called a) if-else b) else-if-else c) if-else-if-else d) chain if/if-else-if

1142


What is the use of function in c?

1193


Write a program on swapping (100, 50)

1124


formula to convert 2500mmh2o into m3/hr

995


Is c is a high level language?

1192


What is meant by preprocessor in c?

1013


What is static volatile in c?

1019


What is d scanf?

1088


What is the meaning of c in c language?

1161


Do you know the use of 'auto' keyword?

1194


Define Spanning-Tree Protocol (STP)

1129