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 pgm to print
1
1 2 1
1 2 3 2 1
1 2 3 4 3 2 1

Answer Posted / nisrar

void main()
{
int i,j,k,m;
for(i=1;i<=4;i++)
{
for(j=4;j>i;j--)
{
printf(" ");
}
for(k=1;k<=i;k++)
{
printf("%d",k);
}
for(m=i;m>1;m--)
{
printf("%d",m-1);
}
printf("\n");
}
}

Is This Answer Correct ?    7 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is multithreading possible in c?

1023


Explain what are reserved words?

1115


How can I run c program?

1184


What is storage class?

1087


Can we replace the struct function in tree syntax with a union?

1315


write a program to generate address labels using structures?

4586


regarding pointers concept

2052


What is C language ?

1976


Is c easier than java?

1086


#include int main(){ int i=10; int *ptr=&i; *ptr=(int *)20; printf("%d",i); return 0; } Output: 20 can anyone explain how came the output is 20

1728


What is getch () for?

1249


What is #define used for in c?

1069


What is operator promotion?

1086


how to count no of words,characters,lines in a paragraph.

4434


Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?

1113