-->

Write a program to show the difference between INT (), CINT () and FIX () functions using QBasic

Write a program to show the difference between INT (), CINT () and FIX () functions.

QBasic Code:  

Cls

Rem To show the differences between INT (), CINT() and FIX () functions

Print "N", "INT (N)", "CINT (N)", "FIX (N)"

Print 4.3, Int(4.3), CInt(4.3), Fix(4.3)

Print 4.5, Int(4.5), CInt(4.5), Fix(4.5)

Print 4.7, Int(4.7), CInt(4.7), Fix(4.7)

Print -4.3, Int(-4.3), CInt(-4.3), Fix(-4.3)

Print -4.5, Int(-4.5), CInt(-4.5), Fix(-4.5)

Print -4.7, Int(-4.7), CInt(-4.7), Fix(-4.7)

End


Output



You May Like Also Also Like This

Post a Comment

0 Comments