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

Insights of tri-state inverters?

0 Answers  


which language is not object oriented?

3 Answers   NIC, BSNL,


compare the delay in sending x-bit msg over k-hop path in ckt switched nw nin lightil loaded packet swithed nw. the ckt setup time is s per hop,the packet size is p bits n data rate is' b' bps under what condition does packet nw have lower delay?

0 Answers   Mtech,


write the expression for a multiple Pi section filter's ripple factor?

0 Answers   TCS,


what must be the kind of test on innovatronix

0 Answers   HP,






what is a tetrode transisitor ? show the structure of such a device and indicate the polarity of the biasing voltage applied to each element?

0 Answers  


how many flip flops you require for modulo 19 counter

16 Answers   TCS, UGC NET, Cadence, University Exams,


A multiplexer, with 3-bei data select inputs, is a A 4:1 multiplexer B 8:1 multiplexer C 16:1 multiplexer D 32:1 multiplexer

1 Answers  


negative feedback connections in flip flop

1 Answers  


1. What is leakage current? 2. Transistor VI characters? Explain. 3. What is dc load line? 4. Differential amplifier circuit. 5. Recursive interrupts. 6. Diagram case microcontroller and Eprom 7. Use of grey code? 8. Design counter from 1 to 11. 9. Characteristic impedence?Z0 value of probe used in lab. 10. 3 input TTL logic. 11. What is Pseudo random sequence? Why it is called so? 12. What is stack? 13. Different types of voltage regulation?

0 Answers   Wipro,


value of 4 bit A+~A

3 Answers   Air Force, AAI Airports Authority Of India,


what is practical application of flip flop, decoder, mux, demux and encoder?

7 Answers   Jyothy Laboratories,






Categories
  • Civil Engineering Interview Questions Civil Engineering (4707)
  • Mechanical Engineering Interview Questions Mechanical Engineering (3738)
  • Electrical Engineering Interview Questions Electrical Engineering (15916)
  • Electronics Communications Interview Questions Electronics Communications (2686)
  • Chemical Engineering Interview Questions Chemical Engineering (764)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (166)
  • Bio Engineering Interview Questions Bio Engineering (30)
  • Metallurgy Interview Questions Metallurgy (169)
  • Industrial Engineering Interview Questions Industrial Engineering (199)
  • Instrumentation Interview Questions Instrumentation (2886)
  • Automobile Engineering Interview Questions Automobile Engineering (236)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (74)
  • Marine Engineering Interview Questions Marine Engineering (103)
  • Power Plant Engineering Interview Questions Power Plant Engineering (170)
  • Textile Engineering Interview Questions Textile Engineering (198)
  • Production Engineering Interview Questions Production Engineering (0)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (73)
  • Engineering AllOther Interview Questions Engineering AllOther (1374)