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



how do i write program like one shown 1234567654321 123456 654321 12345 54321 1234 4321 ..

Answer / ayshu

it can be done using nested for loop

Is This Answer Correct ?    20 Yes 3 No

how do i write program like one shown 1234567654321 123456 654321 12345 54321 1234 4321 ..

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

how do i write program like one shown 1234567654321 123456 654321 12345 54321 1234 4321 ..

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




how do i write program like one shown 1234567654321 123456 654321 12345 54321 1234 4321 ..

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

Post New Answer



More Electronics Communications Interview Questions

state the important rating of transistor?

1 Answers  


Why Visual Basic is referred to as "Front End Tool"?

2 Answers   Oracle, IBM, College School Exams Tests,


explain with a suitable diagram how a vidicon pick-up tube is employed in a monochrome TV camera to develop luminance signal

0 Answers  


what is the exact difference between zener breakdown voltage and avalanche voltage??

3 Answers   TCS,


WHAT TYPE OF GKS ASKED?

0 Answers  






Am naseem sabah..i applied for PE in BEL.if anybody having sample questions for written test in BEL,pls forward to my mail id ....nsm.sbh@gmail.com..plsssssssssssss

0 Answers  


how can we define the direction of current with needle movement of an ammeter?

2 Answers  


is multiplexing used in 8085 or not ?

12 Answers   ONGC,


what is the difference between isdn and idn?

0 Answers   Sony,


how do i write program like one shown 1234567654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1

4 Answers   TCS, HCL, DELL, Wipro, NIIT, College School Exams Tests, Punjabi University, Queen Mary College,


HI FRDS AM saranya i did BE (2009 PASSOUT)I PLAN TO DO DOTNET. CAN ANYBODY TELL ME WHICH TRINEE CENTRE WILL BE BEST FOR DOTNET WITH PLACEMENTS

1 Answers  


What is mean by Compression technic and its formula? How many types of adaptors are there? How adaptive algorithm works for speech compression using Cosine packet transform?

0 Answers  






Categories
  • Civil Engineering Interview Questions Civil Engineering (4646)
  • Mechanical Engineering Interview Questions Mechanical Engineering (3704)
  • Electrical Engineering Interview Questions Electrical Engineering (15793)
  • Electronics Communications Interview Questions Electronics Communications (2638)
  • Chemical Engineering Interview Questions Chemical Engineering (762)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (79)
  • Bio Engineering Interview Questions Bio Engineering (30)
  • Metallurgy Interview Questions Metallurgy (95)
  • Industrial Engineering Interview Questions Industrial Engineering (199)
  • Instrumentation Interview Questions Instrumentation (2884)
  • Automobile Engineering Interview Questions Automobile Engineering (171)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (41)
  • Marine Engineering Interview Questions Marine Engineering (62)
  • Power Plant Engineering Interview Questions Power Plant Engineering (170)
  • Engineering AllOther Interview Questions Engineering AllOther (1336)