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:-

Second largest number in java using ternary operator

 //Largest second number using ternary operator public class Main { public static void main(String[] args) { int a=5,b=6,c=7; int ...