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 need recent placement paper

1881


What are the advantages of active filters?

1080


The magnitude of electrostatic force between two identical positive ions that are separated by a distance of 5.0 x 10– 10 m is 3.7 x 10–9 N. (a) What is the charge of each ion? (b) How many electrons are “missing” from each ion?

2092


sir i want polytechnic lecturers model papers plzzzzzzzzz send me my mail id: manisri.bobbala@gmail.com

2646


In OC-n why n X 51.84 Mbps??? How 51.84 Mbps is come it is a limit of STS-1 or something else.???

2243


what is meant by shear resistance in concrete?

2138


What are the KPI that decides the capacity expansion of SGSN/MME?

3506


Define hybrid parameter?

1175


write test cases for cases

2013


What are the applications of dc chopper?

1137


hello! i am a new/fresh industrial electronics enginner ? I am going to have an interview on 10 May. What topics and questions should i study for the preparation of my interview and what will be the possible questions that one can ask from a fresh industrial electronics engineer ?

2176


what is code vector?

2201


why cristal frequency is different in microcontrollers and crystal oscillators?

1971


We take the area of collector wide comparison to base and emitter. Why?

1051


what is associate law?

1124