Test | Status | Code Input and Output |
---|---|---|
1 | Pass |
x = 1881;y_correct = 30;
assert(isequal(yearraey(x),y_correct))
y =
30
|
2 | Pass |
x = 2014;y_correct = 1;
assert(isequal(yearraey(x),y_correct))
y =
1
|
3 | Pass |
x = 2015;y_correct = 0;
assert(isequal(yearraey(x),y_correct))
y =
0
|
4 | Pass |
x = 606;y_correct = 27;
assert(isequal(yearraey(x),y_correct))
y =
27
|
5 | Pass |
x = 6006;y_correct = 71;
assert(isequal(yearraey(x),y_correct))
xabin =
'1011100011101'
xabin =
'1011110011101'
xabin =
'1011110111101'
y =
71
|
6 | Pass |
x = 60006;y_correct = 369;
assert(isequal(yearraey(x),y_correct))
y =
369
|
7 | Pass |
k=zeros(1,15);
for n=1:15
y=2^n+2;
k(n)=yearraey(y);
end
y_correct=[1 1 5 3 11 7 23 15 47 31 95 63 191 127 383];
assert(isequal(k,y_correct))
y =
1
y =
1
y =
5
y =
3
y =
11
y =
7
y =
23
y =
15
y =
47
y =
31
y =
95
y =
63
y =
191
y =
127
y =
383
|
Program an exclusive OR operation with logical operators
639 Solvers
Find a subset that divides the vector into equal halves
332 Solvers
Area of an equilateral triangle
2763 Solvers
274 Solvers
184 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!