The following is an algorithm that convert decimal number to octal.

start
1. let num be an array of integer
2. input n
3. let rem=0, ctr=0
4. while (rem!=1)
begin
q=n/8
rem=n mod 8
num[ctr]=rem
ctr++
n=q
end
5. while(ctr>=0)
begin
print num[ctr]
ctr=ctr-1
end
end

**You can easily turn this algorithm to convert from decimal to others.
--------------------------------------------------------
Human do error, please email:- webmaster@piyadas-world.com if you find any. Please visit http://www.piyadas-world.com for more resource.

0 comments