Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for k = (1:1:1000)
- for i = (100:1:999)
- num = num2str(i);
- if (num(1) == num(2)) & (num(2) == num(3))
- totalSum = 0;
- for l = (1:1:i)
- totalSum = totalSum + l;
- if totalSum == i
- l
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement