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
i need recent placement paper
What are the advantages of active filters?
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?
sir i want polytechnic lecturers model papers plzzzzzzzzz send me my mail id: manisri.bobbala@gmail.com
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.???
what is meant by shear resistance in concrete?
What are the KPI that decides the capacity expansion of SGSN/MME?
Define hybrid parameter?
write test cases for cases
What are the applications of dc chopper?
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 ?
what is code vector?
why cristal frequency is different in microcontrollers and crystal oscillators?
We take the area of collector wide comparison to base and emitter. Why?
what is associate law?