Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/Arithmetic-Integer/FreeBASIC/arithmetic-integer.basic
Normal file
16
Task/Arithmetic-Integer/FreeBASIC/arithmetic-integer.basic
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
' FB 1.05.0 Win64
|
||||
|
||||
Dim As Integer i, j
|
||||
Input "Enter two integers separated by a comma"; i, j
|
||||
Print i;" + "; j; " = "; i + j
|
||||
Print i;" - "; j; " = "; i - j
|
||||
Print i;" * "; j; " = "; i * j
|
||||
Print i;" / "; j; " = "; i \ j
|
||||
Print i;" % "; j; " = "; i Mod j
|
||||
Print i;" ^ "; j; " = "; i ^ j
|
||||
Sleep
|
||||
|
||||
' Integer division (for which FB uses the '\' operator) rounds towards zero
|
||||
|
||||
' Remainder (for which FB uses the Mod operator) will, if non-zero, match the sign
|
||||
' of the first operand
|
||||
Loading…
Add table
Add a link
Reference in a new issue