Cody

Gaston Levannier

21014
Rank
2
Badges
60
Score
1 – 7 of 7

Gaston Levannier submitted a Comment to Solution 1324836

With my function and R2015B, it works so I don't understand: function y = isPernicious(x) %UNTITLED2 Summary of this function goes here % Detailed explanation goes here if(x == 1) y = true; else if(mod(x,2) == 0) y = false; else y = true; % PRIME for k=3:2:x-2 if(mod(x,k) == 0) y = false; % NOT PRIME break; end end end end end

on 2 Nov 2017

Gaston Levannier received Commenter badge for Solution 1324836

on 2 Nov 2017

Gaston Levannier received Solver badge for Solution 1320424

on 30 Oct 2017

1 – 7 of 7