Example 24: Base Conversion

Learn how to convert an integer from decimal to its equivalent octal base.

Problem

Write a program that receives a positive integer and returns its octal equivalent.

Demonstration

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.