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

what is electronics

9 Answers   Google, L&T, Rocket Media,


light travels faster than sound then why do we hear sound first and not video in telivision?

4 Answers   Infosys,


Describe transducer ei pickups in instrumentation and control engineering?

0 Answers  


with the aid of diagrams explain pulse modulation,pulse position modulation and pulse amplitude modulation

1 Answers   Value Labs, Zimbabwe Broadcasting Corporation ZBC,


Q.1what is E1? Q.2what is diffrence b/w RNC & BSC? Q.3what is STM? Q.4what is LAC & CI? Q.5 what is HSN, MAIO, MA Group & frequency hopping?

0 Answers  






Y did u select he engineering?

4 Answers   TCS,


HOW CAN I WRITE the SCENARIO , USE CASE , Hierarchical Task Analysis AND PLAN FOR ATM ? URGENT

0 Answers  


Why crystal oscillator at 11.59MHz is used in Interactive voice responce circuit.

2 Answers  


Is a hole a fundamental particle in an atom?

0 Answers  


Draw the circuit of ce configurations using npn transistor.

0 Answers  


What happens when an inverter is placed between both inputs of s-k flip flop?

0 Answers  


in what condition transistor act as switch and amplifier?

1 Answers   Spiro Solutions,


Categories
  • Civil Engineering Interview Questions Civil Engineering (5085)
  • Mechanical Engineering Interview Questions Mechanical Engineering (4451)
  • Electrical Engineering Interview Questions Electrical Engineering (16632)
  • Electronics Communications Interview Questions Electronics Communications (3918)
  • Chemical Engineering Interview Questions Chemical Engineering (1095)
  • Aeronautical Engineering Interview Questions Aeronautical Engineering (239)
  • Bio Engineering Interview Questions Bio Engineering (96)
  • Metallurgy Interview Questions Metallurgy (361)
  • Industrial Engineering Interview Questions Industrial Engineering (259)
  • Instrumentation Interview Questions Instrumentation (3014)
  • Automobile Engineering Interview Questions Automobile Engineering (332)
  • Mechatronics Engineering Interview Questions Mechatronics Engineering (97)
  • Marine Engineering Interview Questions Marine Engineering (124)
  • Power Plant Engineering Interview Questions Power Plant Engineering (172)
  • Textile Engineering Interview Questions Textile Engineering (575)
  • Production Engineering Interview Questions Production Engineering (25)
  • Satellite Systems Engineering Interview Questions Satellite Systems Engineering (106)
  • Engineering AllOther Interview Questions Engineering AllOther (1379)