➽ Program:-
decimal_number
= int(input("Enter the Decimal Number: "))
octal_number = []
i = 0
while
decimal_number != 0:
rem = decimal_number % 8
octal_number.insert(i, rem)
i = i+1
decimal_number = int(decimal_number/8)
i = i
- 1
print("Octal
value is ",end="")
while
i>=0:
print(octal_number[i],end="")
i = i-1
print()
➽ Output:-
Enter the Decimal Number: 92
Octal value is 134
0 Comments
Please do not enter any spam link in the comment section.