QBASIC Decimal to Binary

QBasic program
Accept a number in decimal and convert in binary.
CLS
INPUT "ENTER A NUMBER:"; N
S=1
WHILE (N>0)
R=N MOD 2
S=S*10+R
N=N\2
WEND
PRINT (S-1)\10
END

COMMENT

No comments:

Post a Comment

any problem in any program comment:-

Infix postfix prefix

 import java.util.Stack; import java.util.Scanner; public class ExpressionConverter {     // Function to return precedence of operators     ...