Test  Status  Code Input and Output 

1  Pass 
x = 4;
tf_correct = true;
assert(isequal(isSmith(x),tf_correct ))
A =
0
A =
4
b =
2 2
B =
0
c =
'2'
B =
2
c =
'2'
B =
4
tf =
logical
1

2  Pass 
x = 265;
tf_correct = true;
assert(isequal(isSmith(x),tf_correct ))
A =
0
A =
2
A =
8
A =
13
b =
5 53
B =
0
c =
'5'
B =
5
c =
'53'
B =
10
B =
13
tf =
logical
1

3  Pass 
x = 588;
tf_correct = true;
assert(isequal(isSmith(x),tf_correct ))
A =
0
A =
5
A =
13
A =
21
b =
2 2 3 7 7
B =
0
c =
'2'
B =
2
c =
'2'
B =
4
c =
'3'
B =
7
c =
'7'
B =
14
c =
'7'
B =
21
tf =
logical
1

4  Pass 
x = 1086;
tf_correct = true;
assert(isequal(isSmith(x),tf_correct ))
A =
0
A =
1
A =
1
A =
9
A =
15
b =
2 3 181
B =
0
c =
'2'
B =
2
c =
'3'
B =
5
c =
'181'
B =
6
B =
14
B =
15
tf =
logical
1

5  Pass 
x = 4937775;
tf_correct = true;
assert(isequal(isSmith(x),tf_correct ))
A =
0
A =
4
A =
13
A =
16
A =
23
A =
30
A =
37
A =
42
b =
3 5 5 65837
B =
0
c =
'3'
B =
3
c =
'5'
B =
8
c =
'5'
B =
13
c =
'65837'
B =
19
B =
24
B =
32
B =
35
B =
42
tf =
logical
1

6  Pass 
x = 5;
tf_correct = false;
assert(isequal(isSmith(x),tf_correct ))
A =
0
A =
5
b =
5
B =
0
tf =
logical
0

7  Pass 
x = 1000;
tf_correct = false;
assert(isequal(isSmith(x),tf_correct ))
A =
0
A =
1
A =
1
A =
1
A =
1
b =
2 2 2 5 5 5
B =
0
c =
'2'
B =
2
c =
'2'
B =
4
c =
'2'
B =
6
c =
'5'
B =
11
c =
'5'
B =
16
c =
'5'
B =
21
tf =
logical
0

8  Pass 
x = 94.1;
tf_correct = false;
assert(isequal(isSmith(x),tf_correct ))
tf =
logical
0

9  Pass 
x = 202.689;
tf_correct = false;
assert(isequal(isSmith(x),tf_correct ))
tf =
logical
0

10  Pass 
x = pi;
tf_correct = false;
assert(isequal(isSmith(x),tf_correct ))
tf =
logical
0

11  Pass 
x = 4;
tf_correct = false;
assert(isequal(isSmith(x),tf_correct ))
tf =
logical
0

Return the largest number that is adjacent to a zero
3115 Solvers
1786 Solvers
Increment a number, given its digits
505 Solvers
Project Euler: Problem 2, Sum of even Fibonacci
461 Solvers
190 Solvers