how do i write program like one shown
1234567654321
123456 654321
12345 54321
1234 4321
123 321
12 21
1 1
Answers were Sorted based on User's Feedback
Answer / swathi
we have to use nested for loops and also some predefined
functions which makes the cursor to jump to new location or
else \n,]b can be used in c pragram
| Is This Answer Correct ? | 8 Yes | 3 No |
Answer / cinu
#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;j++)
printf(" ");
for(j=n-i;j>0;j--)
printf("%d",j);
printf("\n");
}
}
| Is This Answer Correct ? | 9 Yes | 6 No |
Answer / 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 |
What is equalisation? Why do we need it?
Why gold is added to the p-n junction?
can any one tell difference between 802D and 810D???
Who is the inventor of the Automatic Voltage Regulator?
I am completed BE electronics and communication engineer I have 4 years experience in mainteance dept .am applying for c license is possible...How 2 get c license
I am going to join in RFID technology company in chennai.what about the future for that technology?
List out the direct type adcs.
which remote subscriber provide voice communication?
Can any one tell me what ll be the interview questions for fresher in lectronics.
how to test the mobile tower signals? and which software tool & hardware tools used for test the mobile tower?
what is the use of FR-4(flame retardant)in PCB design why dielectric material used in inner layer in PCB design technology??
What are Drift and Diffusion currents?
12 Answers CLG, Nokia, TCS,
Civil Engineering (5086)
Mechanical Engineering (4456)
Electrical Engineering (16639)
Electronics Communications (3918)
Chemical Engineering (1095)
Aeronautical Engineering (239)
Bio Engineering (96)
Metallurgy (361)
Industrial Engineering (259)
Instrumentation (3014)
Automobile Engineering (332)
Mechatronics Engineering (97)
Marine Engineering (124)
Power Plant Engineering (172)
Textile Engineering (575)
Production Engineering (25)
Satellite Systems Engineering (106)
Engineering AllOther (1379)