RosettaCodeData/Task/A+B/FreeBASIC/a+b.basic

18 lines
362 B
Plaintext

' fb 1.05.0 Win64
Dim As Integer a, b
Do
Print "Enter two integers separated by a space : ";
Input "", a, b
If Abs(a) > 1000 OrElse Abs(b) > 1000 then
Print "Both numbers must be in the interval [-1000, 1000] - try again"
Print
Else
Print "Their sum is"; a + b
Exit Do
End If
Loop
Print
Print "Press any key to quit the program"
Sleep