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

What precautions are required to be observed in the use of leds?

1350


is there any good institute in mumbai that provides good Automation courses ?

1970


Factors responsible for voice cracking in Mobile communication?

2362


.We want to compare the performance of a single threaded disk server with a multithreaded 1. Suppose the server takes 25 ms to receive a request for work from client, dispatch the request for processing and actual data request processing when reqd. Data is in main memory. If the reqd. Data is not in the main memory a real disk operation is needed and an additional 75 ms are reqd. On the average. On the average 25% of the clients requests access the disk. During the disk I/O period the thread waits. Assume that there is no other process in system when the server is running. How many requests can the server handle per second if its a)single threaded b)multithreaded

2010


What are the function of different capacitor, resistors, transister, diods, thyrister( like SCR)in any circuit?

2246


Why making capacity of the circuit breaker is higher than breaking capacity?

1013


plz send me some apts question paper for aricent. thanks in advance

2412


Define what is a high-pass filter?

1057


What do you understand by collector reverse saturation? In which configuration does it have a greater value?

1511


What are the features of instrumentation amplifier?

1261


Why is it necessary to include voltage stabilizer in a power supply?

1234


Explain the configuration of 4+4+4.

2067


what is different between three phase balanced and three phase unbalanced load with chart.?

1242


What are the main divisions of power system?

1295


which modulation will be suitable for transmitting audio file? is there any transformation needed for transmission?

1614