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 do i write program like one shown
1234567654321
123456 654321
12345 54321
1234 4321
123 321
12 21
1 1

Answer Posted / amit

#include<stdio.h>
int main()
{
int i,j,n;
printf("Enter no");
scanf("%d",&n);
for(i=0;i<=n;i++)
{

for(j=1;j<=n-i;j++)
printf("%d",j);
for(j=0;j<2*i-1;j++)
printf(" ");
for(j=n-i;j>0;j--)
printf("%d",j);

printf("\n");
}
}

Is This Answer Correct ?    0 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

i am electronics & comm engg & appling 4 the AAI jr executive (electronics/ATC) written test. pls forward me the syllabus & old question papers.I will be very much thankful to you, snehalsanap@gmail.com

2026


What is the distance from an RF Transmitter that output power is determined?

2278


what is the bani fit of ss7 by using as a back bone for all other communication networks?

2584


What are rlc circuits?

984


what should I refer for examination of BSNL-TTA. Please suggest me good reference...so that I can clear this exam.

1979


I want previous rrb enteranse exam papers in section engineer. please send that papers to my id rohit_nist@yahoo.co.in

2739


hi i am electronics & telecomm engg & appling 4 the AAI jr executive (electronics/ATC) written test. pls forward me the syllabus & old question papers.I will be very much thankful to you. das.nilanjana2000@gmail.com

1893


i m a b.tech 2nd yr student.. i can be placed in my degree but still should i think for MBA?

1926


Define octet?

1029


Define negative logic.

1164


Explain what is meant by virtual ground in the op amp?

946


Define drift current in a semiconductor.

1092


What is a sequential circuit and what is a combinational circuit?

1130


Explain the approximate cost of the smart pebbles eci-1(embedded corrosion instrument)?

934


Explain the difference between masking and non-masking?

1082