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

What does *p++ do?

1029


What is a structure in c language. how to initialise a structure in c?

1067


Is fortran faster than c?

1048


Explain the difference between the local variable and global variable in c?

1082


What does the format %10.2 mean when included in a printf statement?

1663


Give differences between - new and malloc() , delete and free() ?

1106


What are data structures in c and how to use them?

1180


What is default value of global variable in c?

995


If I have a char * variable pointing to the name of a function ..

1179


How are 16- and 32-bit numbers stored?

1293


How does pointer work in c?

1132


What is character constants?

1193


Who invented b language?

1427


What is the difference between scanf and fscanf?

1276


What is adt in c programming?

1174