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
How many GDA exists for a group ?
define why diodes are not operated in the breakdown region in rectifiers?
What is an instrumentation amplifier?
What are the popular ic packages available?
What is Interleaving? Why do we need it?
Why cc configuration is called a voltage buffer? Define what is other name?
What are potential transformers?
What is monotonic dac?
Fr aptitude question which for preparing good book?
What is a bcd? What are its advantages and disadvantages? Why is an excess-3 code is called an unweighted code?
A PLL maintains lock by comparing A The phase of two signals B The frequency of two signals C The amplitude of two signals D None of these
What do you mean by donor and acceptor impurities?
Tell me what are the components has to be done in fpga board (altera)?
plz help how can i operate my n/w support system through ,help me by providing complete soln
Explain how to increase the gain and directivity of an antenna?