blob: 1541288f315cd0a57700b8e35ba5972a887a9d94 (
plain)
1
2
3
4
5
6
7
8
9
10
|
def decimal_to_Octal(deciNum):
octalNum = 0
countval = 1;
dNo = deciNum;
while (deciNum!= 0):
remainder= deciNum % 8;
octalNum+= remainder*countval;
countval= countval*10;
deciNum //= 8;
return (octalNum)
|