In my assignment of converting a number from one base system to another, whenever m dividing a decimal no; an integer in dat type by some number; many irregular results are coming; which i got when i debugged my program.
For converting a no, to binary when m dividing it by 2; only for special cases like; for 7/2 i got 4 instead of 3 and hence the complete answer is changing.
For 15/16 i got 1 instead of 0.
A very small part of my one function m posting over here.
Tell me if u can point out what's wrong,
Do
reminder(j) = store Mod 2
store = store / 2
j = j + 1
Loop While (store <> 0)
For converting a no, to binary when m dividing it by 2; only for special cases like; for 7/2 i got 4 instead of 3 and hence the complete answer is changing.
For 15/16 i got 1 instead of 0.
A very small part of my one function m posting over here.
Tell me if u can point out what's wrong,
Do
reminder(j) = store Mod 2
store = store / 2
j = j + 1
Loop While (store <> 0)
Comment