write a GW or Q BASIC program to receive a number from keyboard and display the number of digits of the number
10 input "Enter value ";x#
20 let n$ = strs(x#)
30 let d=len(n$) - 1
40 print "Digit = ";d
50 print
60 goto 10
70 end
---------------------------------------------------Output-------------------------------------------------------
Enter value : 325612
Digit = 6
20 let n$ = strs(x#)
30 let d=len(n$) - 1
40 print "Digit = ";d
50 print
60 goto 10
70 end
---------------------------------------------------Output-------------------------------------------------------
Enter value : 325612
Digit = 6
How to download Basic compiler
ReplyDelete