help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Parse Error


From: platinumrecord
Subject: Parse Error
Date: Thu, 22 Sep 2016 10:51:56 -0700 (PDT)

Hello, I'm currently trying to create a code for the Collatz Conjecture. I've
been receiving a parse error and for the life of me cannot figure out where
it's coming from. Please help if you can!

function[]=collatz3(n)
loopcount=0;
while n ~= 1
  loopcount=loopcount + 1;
  if IsEven(n)==1
    n=(n/2);
  else
    n=((n*3)+1);
endwhile;
print(loopcount); 
end; 
  



--
View this message in context: 
http://octave.1599824.n4.nabble.com/Parse-Error-tp4679890.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]