Basic Decisions in Julia


Example: if in Julia


	age = 22
	if age >= 18 
		print("You can vote") 
	end
	

Output:

  You can vote


Example: if-Else in Julia


	N = 33
	if N>=0 
		print("N is positive") 
	else 
	   print("N is negative") 
	end
	

Output:

  N is positive


Example: if-elseif-else in Julia


	score = 77
	if score >= 90
		print("You achieved an A.") 
	elseif score >= 80
		print("You achieved a B.") 
	elseif score >= 70
		print("You achieved a C.") 
	elseif score >= 60
		print("You achieved a D.") 
	else
		print("You achieved an E.") 
	end
	

Output:

  You achieved a C.