Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add4[x_] := x + 4
- Do[a = add4[t];
- If[a == 6 && add4[t + 1] == 7, Break[]], {t, 5}]
- a
- Clear[add4]
- count = 0;
- add4[x_] := add4[x] = (count++; x + 4)
- Do[a = add4[t];
- If[a <= 6 && add4[t + 1] == 7, Break[]], {t, 5}]
- {a, count}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement