Script - Bitcoin Programming Discussion

2 2 op_mul 3 3 op_mul op_add

1 Like

I started with 3 * 3 first (I was thinking completely backwards) :grinning:

1 Like

Yeah, that’s the intuitive way. Stack programming is upside down :wink:

Now I know it’s from left to right :+1:

1 Like

is there any difference between writing it on one line vs 3?

1 Like

2 2 op_mul 3 3 op_mul op_add

1 Like

No, that should be fine.

2 2 op_mul 3 3 op_mul 
op_add
1 Like

Answer:

2 2 OP_MUL
3 3 OP_MUL
OP_ADD
1 Like

2 2 op_mul 3 3 op_mul op_add

1 Like

Answer is 2 2 OP_MUL 3 3 OP_MUL OP_ADD

1 Like

Answere

2 2 OP_MUL 3 3 OP_MUL OP_ADD
1 Like

2 2 op_mul 3 3 op_mul op_add

1 Like

2 2 op_mul 3 3 op_mul op_add

1 Like

Answer: 2 2 op_mul 3 3 op_mul op_add

1 Like

This is my answer
2 2 3 3 OP_MUL OP_ADD OP_ADD

1 Like

2 2 OP_MUL 3 3 OP_MUL OP_ADD

I thought I did something wrong at first when it showed
3
3
4
in the stack. I thought i was going to multiply all three together and give me 36 lol.

1 Like

2 2 OP_MUL 3 3 OP_MUL OP ADD is the answer

1 Like

Haha yeah it’s a little confusing in the beginning. Good job!

My script is: 2 2 OP_MUL 3 3 OP_MUL OP_ADD

1 Like