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
First show us what you have done so far?anksingla1
11
121
1331
14641
can anyone tell the code of this pattern.?? -
@anksingla-ttYJbX • Sep 10, 2014
Yeah right
Anoop KumarWhat is next number?? is it 15101051? -
@anksingla-ttYJbX • Sep 10, 2014
i am using net on my phone...can't show you the code that i tried..Sanyam KhuranaFirst show us what you have done so far? -
@sanyam-Nl7Zqc • Sep 10, 2014
No problem, show us the code when you can and then we would help 😀anksinglai am using net on my phone...can't show you the code that i tried.. -
@thebigk • Sep 10, 2014
We are in no hurry. Take your time.anksinglai am using net on my phone...can't show you the code that i tried.. -
@manish-r2Hoep • Sep 10, 2014
Very Simple Program,
Simple Loop, and then a single line if you know multiplication -
@anksingla-ttYJbX • Sep 10, 2014
Yeah this program is a simple multiplication of 11 but I was asked this in different way..Manish GoyalVery Simple Program,
Simple Loop, and then a single line if you know multiplication
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?
Oops.... next number will be 161051.anksinglaYeah right
#-Link-Snipped-# , has provided you the right solution. 😉 -
@anksingla-ttYJbX • Sep 10, 2014
I forgot to mention that question is not multiplication of 11..Anoop KumarOops.... next number will be 161051.
#-Link-Snipped-# , has provided you the right solution. 😉
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-ttYJbX • Sep 10, 2014
yes...but I didn't got the right code for this.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?
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
Wow! 😕pritambuYes because that code is working and giving the correct output. -
@sanyam-Nl7Zqc • Sep 17, 2014
Standing ovation for you!pritambuYes because that code is working and giving the correct output.
You made all of us look idiots 😀