Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 1;
y_correct = 1;
assert(isequal(sum_all_digits(x),y_correct))
q =
'1'
y =
0
y =
1
|
2 | Pass |
x = 112;
y_correct = 4;
assert(isequal(sum_all_digits(x),y_correct))
q =
'112'
y =
0
y =
1
y =
2
y =
4
|
3 | Pass |
x = 18547;
y_correct = 25;
assert(isequal(sum_all_digits(x),y_correct))
q =
'18547'
y =
0
y =
1
y =
9
y =
14
y =
18
y =
25
|
4 | Pass |
x = 147852369;
y_correct = 45;
assert(isequal(sum_all_digits(x),y_correct))
q =
'147852369'
y =
0
y =
1
y =
5
y =
12
y =
20
y =
25
y =
27
y =
30
y =
36
y =
45
|
5 | Pass |
x = 753159;
y_correct = 30;
assert(isequal(sum_all_digits(x),y_correct))
q =
'753159'
y =
0
y =
7
y =
12
y =
15
y =
16
y =
21
y =
30
|
6 | Pass |
x = 1000245879653254;
y_correct = 61;
assert(isequal(sum_all_digits(x),y_correct))
q =
'1000245879653254'
y =
0
y =
1
y =
1
y =
1
y =
1
y =
3
y =
7
y =
12
y =
20
y =
27
y =
36
y =
42
y =
47
y =
50
y =
52
y =
57
y =
61
|
Project Euler: Problem 1, Multiples of 3 and 5
1490 Solvers
348 Solvers
483 Solvers
548 Solvers
Matlab Basics - y as a function of x
339 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!