Need help in a program..

1
11
121
1331
14641
can anyone tell the code of this pattern.??

Replies

  • Kaustubh Katdare
    Kaustubh Katdare
    Dear #-Link-Snipped-# - We'd really love to see your attempt at the code. Don't worry even if it's wrong. Please share it so that the expert coders here can help you fix it. It'll be a great learning for you as well.
  • Anoop Kumar
    Anoop Kumar
    What is next number?? is it 15101051?
  • Sanyam Khurana
    Sanyam Khurana
    anksingla
    1
    11
    121
    1331
    14641
    can anyone tell the code of this pattern.??
    First show us what you have done so far?
  • anksingla
    anksingla
    Yeah right
    Anoop Kumar
    What is next number?? is it 15101051?
  • anksingla
    anksingla
    Sanyam Khurana
    First show us what you have done so far?
    i am using net on my phone...can't show you the code that i tried..
  • Sanyam Khurana
    Sanyam Khurana
    anksingla
    i am using net on my phone...can't show you the code that i tried..
    No problem, show us the code when you can and then we would help 😀
  • Kaustubh Katdare
    Kaustubh Katdare
    anksingla
    i am using net on my phone...can't show you the code that i tried..
    We are in no hurry. Take your time.
  • Manish Goyal
    Manish Goyal
    Very Simple Program,

    Simple Loop, and then a single line if you know multiplication
  • anksingla
    anksingla
    Manish Goyal
    Very Simple Program,

    Simple Loop, and then a single line if you know multiplication
    Yeah this program is a simple multiplication of 11 but I was asked this in different way..
    numbers b/w two 1's is the sum of two numbers of above line..like in 121 2 is sum of 11 which is above of 121...
    can we made the logic of this pattern in this way..???
  • Anoop Kumar
    Anoop Kumar
    Anoop Kumar
    What is next number?? is it 15101051?
    anksingla
    Yeah right
    Oops.... next number will be 161051.
    #-Link-Snipped-# , has provided you the right solution. 😉
  • anksingla
    anksingla
    Anoop Kumar
    Oops.... next number will be 161051.
    #-Link-Snipped-# , has provided you the right solution. 😉
    I forgot to mention that question is not multiplication of 11..
    the question I asked is to find the
    "the no's b/w the two 1's is the sum of two no's of above line like in 121 2 is sum of 11 & similarly in 1331 first 3 is sum
    of 12 & second is 21 of 121"...
  • Ramani Aswath
    Ramani Aswath
    One way of looking at multiplying by 11 is 'Shift and Add'. In effect adding ten times the number to the number.
    Put zero in front and at the end of a number that is 0110 for 11. Start adding pairs from the right: 1+0 = 1 which becomes the rightmost digit of the answer. then 1+1 = 2, the second digit and finally 0+1 = 1 the third digit giving the result 121.
    This is the method called 'add the neighbour' by Trachtenberg in his teatise on speed mathematics.
    Is this what you are getting at?
  • anksingla
    anksingla
    A.V.Ramani
    One way of looking at multiplying by 11 is 'Shift and Add'. In effect adding ten times the number to the number.
    Put zero in front and at the end of a number that is 0110 for 11. Start adding pairs from the right: 1+0 = 1 which becomes the rightmost digit of the answer. then 1+1 = 2, the second digit and finally 0+1 = 1 the third digit giving the result 121.
    This is the method called 'add the neighbour' by Trachtenberg in his teatise on speed mathematics.
    Is this what you are getting at?
    yes...but I didn't got the right code for this.
    can u tell what's the code for this??
  • pritambu
    pritambu
    Implement this code and run:

  • Kaustubh Katdare
    Kaustubh Katdare
    #-Link-Snipped-# - You suddenly made all of us look idiot. Also, the code you've provided has been copied from Error - Forget Code
  • pritambu
    pritambu
    Yes because that code is working and giving the correct output.
  • Vishal Sharma
    Vishal Sharma
    pritambu
    Yes because that code is working and giving the correct output.
    Wow! 😕
  • Sanyam Khurana
    Sanyam Khurana
    pritambu
    Yes because that code is working and giving the correct output.
    Standing ovation for you!
    You made all of us look idiots 😀

You are reading an archived discussion.

Related Posts

I always had a query. I have really good software development background (although I am a Mechanical Engineer by education & profession). How do random number generators work? A thought...
what is the reason for the input impedence in the open circuit transmission line to behave inductive or capacitive...?i came to know that depending upon value(+ve or -ve) of (Bl)...
While Apple had everybody’s attention during its iPhone 6 and Apple Watch launch event, Qualcomm Technologies announced a slew of new processors that will bring 4G LTE connectivity equipped smartphones...
Let me introduce myself, im Cesar Balderas from Mexico, im a last year IT engineer student, I joined CE because I was looking for ideas to apply in my 2...
Many of us have experienced the irritating flash of light from an oncoming vehicle while steering along a highway during the late hours. At that time, we just toddle along...