Sure, like the Error says, "UndefVarError: x not defined” 

Julia does not know what x and y are you talking about when you reference them 
in the if statement. 

You need to declare them and provide their values (or declare them and get the 
values later from somewhere, input or database): 

x = 1 
y = 2

if x < y
  println("x is less than y")
elseif x > y
  println("x is greater than y")
else
  for i in 1:x
    print(i, ", ")
  end
end

On April 1, 2016 at 16:51:52, Angeliki Avramidou ([email protected]) 
wrote:

Hi,
Im a student of the University of the Aegean, and i need your help with a 
project in Julia. I  
have done this programm so far, but something is missing in the
beginning and i dont what i have to do to run the programm. Do i
have to put numbers?


  
if x < y

 println("x is less than y")

elseif x > y

 println("x is greater than y")

else

for i in 1:x

   print(i, ", ")

end



end





Thank you





Reply via email to