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

Why can't I perform arithmetic on a void* pointer?

1047


Can we declare function inside main?

948


What is the advantage of c?

1047


How can I rethow can I return a sequence of random numbers which dont repeat at all?

1151


‘ C’ PROGRAME TO SHOW THE TYPE OF TRANGLE BY ACCEPTING IT’S LENGTH .

2842


What are the 32 keywords in c?

1044


What is main return c?

937


Explain how can I avoid the abort, retry, fail messages?

992


What is the full form of getch?

1186


What is the use of bitwise operator?

1070


write a program to create a sparse matrix using dynamic memory allocation.

4843


swap 2 numbers without using third variable?

1086


Why can arithmetic operations not be performed on void pointers?

984


explain what are actual arguments?

1035


What happens if header file is included twice?

1092