Replies
Welcome, guest
Join CrazyEngineers to reply, ask questions, and participate in conversations.
CrazyEngineers powered by Jatra Community Platform
-
@thebigk • Sep 10, 2014
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-GDGRCn • Sep 10, 2014
What is next number?? is it 15101051?
-
@sanyam-Nl7Zqc • Sep 10, 2014
anksingla1
11
121
1331
14641
can anyone tell the code of this pattern.??First show us what you have done so far?
-
anksingla OP
@anksingla-ttYJbX • Sep 10, 2014
-
anksingla OP
@anksingla-ttYJbX • Sep 10, 2014
Sanyam KhuranaFirst 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-Nl7Zqc • Sep 10, 2014
anksinglai 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 ๐
-
@thebigk • Sep 10, 2014
anksinglai am using net on my phone...can't show you the code that i tried..
We are in no hurry. Take your time.
-
@manish-r2Hoep • Sep 10, 2014
Very Simple Program,
Simple Loop, and then a single line if you know multiplication -
anksingla OP
@anksingla-ttYJbX • Sep 10, 2014
Manish GoyalVery Simple Program,
Simple Loop, and then a single line if you know multiplicationYeah 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-GDGRCn • Sep 10, 2014
Anoop KumarWhat is next number?? is it 15101051?
anksinglaYeah right
Oops.... next number will be 161051.
#-Link-Snipped-# , has provided you the right solution. ๐ -
anksingla OP
@anksingla-ttYJbX • Sep 10, 2014
Anoop KumarOops.... 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-VR4O43 • Sep 10, 2014
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 OP
@anksingla-ttYJbX • Sep 10, 2014
A.V.RamaniOne 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-kjLgzG • Sep 11, 2014
Implement this code and run:
<SNIPPED> -
@thebigk • Sep 11, 2014
#-Link-Snipped-# - You suddenly made all of us look idiot. Also, the code you've provided has been copied from <a href="https://forgetcode.com/CSharp/1030-Pascal-triangle-programming" target="_blank" rel="noopener noreferrer">Error - Forget Code</a>
-
@pritambu-kjLgzG • Sep 11, 2014
Yes because that code is working and giving the correct output.
-
@vishal-pysGmK • Sep 16, 2014
-
@sanyam-Nl7Zqc • Sep 17, 2014
pritambuYes because that code is working and giving the correct output.
Standing ovation for you!
You made all of us look idiots ๐