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

Are bit fields portable?

1110


What is hungarian notation? Is it worthwhile?

1168


Why is c not oop?

930


Is c++ based on c?

1025


What are header files and explain what are its uses in c programming?

1070


What is the difference between abs() and fabs() functions?

1063


What is advantage of pointer in c?

1127


What are the basic data types associated with c?

1223


How do I get an accurate error status return from system on ms-dos?

1077


Can one function call another?

1053


How to check whether string is a palindrome, WITHOUT USING STRING FUNCTIONS?

16593


What is a program?

1188


What is structure and union in c?

1075


What is an array in c?

1004


How is = symbol different from == symbol in c programming?

990