GCE Advanced Level ICT
Pages
Home
A/L ICT Syllabus
A/L GIT
A/L ICT Notes (AL)
A/L ICT Revision
ICT Tuition
Links
Saturday, November 19, 2011
An Algorithm to convert Decimal to any base
B=2 #base
place = 0
digit=[]
number = 105 #number to be converted
while (number > 0 )
{
digit[place] = number mod B
number = number div B
place = place + 1
} loop here
print digit[]
Write a python code for this
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment