Computer Science, asked by hardikgupta10000, 2 months ago

Write a java program to enter a decimal numbers. Convert them into octal

equivalents using looping statement​

Answers

Answered by hirarao49
0

Answer:

Explanation:

n the following example, we have an octal value stored in a string variable onum and we are converting it to a decimal value using Integer.parseInt() method. This method accepts String as an argument and converts it into a decimal value based on the base value provided along with the string as argument.

Here in the Integer.parseInt() method, we have passed the base as 8 because the base value of octal number is 8. If you remember the hexadecimal to decimal conversion, we have passed the base as 16 for the conversion.

give thanks

Similar questions