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
What precautions are required to be observed in the use of leds?
is there any good institute in mumbai that provides good Automation courses ?
Factors responsible for voice cracking in Mobile communication?
.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
What are the function of different capacitor, resistors, transister, diods, thyrister( like SCR)in any circuit?
Why making capacity of the circuit breaker is higher than breaking capacity?
plz send me some apts question paper for aricent. thanks in advance
Define what is a high-pass filter?
What do you understand by collector reverse saturation? In which configuration does it have a greater value?
What are the features of instrumentation amplifier?
Why is it necessary to include voltage stabilizer in a power supply?
Explain the configuration of 4+4+4.
what is different between three phase balanced and three phase unbalanced load with chart.?
What are the main divisions of power system?
which modulation will be suitable for transmitting audio file? is there any transformation needed for transmission?