RosettaCodeData/Task/Even-or-odd/FreeBASIC/even-or-odd.freebasic

20 lines
263 B
Plaintext

' FB 1.05.0 Win64
Dim n As Integer
Do
Print "Enter an integer or 0 to finish : ";
Input "", n
If n = 0 Then
Exit Do
ElseIf n Mod 2 = 0 Then
Print "Your number is even"
Print
Else
Print "Your number is odd"
Print
End if
Loop
End