|
Post by Raghu on Dec 27, 2002 4:24:58 GMT
How can we ask the computer to recognize the partof the number in front of the decimal and the part of the number after the decimal? reply me fast. Because if you help me in this, I am shortly coming up with an amazing program!!!!! If you want you can also mail to RaghuKalyan@friendsfan.com
|
|
Ziggi
Full Member
Posts: 87
|
Post by Ziggi on Dec 28, 2002 7:47:08 GMT
Maybe this short program will help you:
CLS
Number# = 0: A$ = "": B$ = ""
INPUT "What numer you want to check :"; Number# ' Geting numerical input (here is not tested for string or numerical)
A$ = STR$(Number#) ' Converting it to string
B$ = RIGHT$(A$, LEN(A$) - 1) ' Geting the number without sing position
FirstNumber$ = MID$(B$, 1, INSTR(1, B$, ".") - 1) ' Number before "."
SecondNumber$ = MID$(B$, INSTR(1, B$, ".") + 1)
PRINT "Your original Number : |"; B$; "|" PRINT "Number before period is "; FirstNumber$ PRINT "Number after period is "; SecondNumber$
|
|
|
Post by Thank you Ziggi on Dec 31, 2002 21:13:17 GMT
Thank you for your help.
|
|