JAVA_CODINGS Telegram 23
14. Program to Convert Binary to Octal.

import java.io.*;

class BinaryToOctal
{
public static void main(String[] args) throws Exception
{
String num = null;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

System.out.print("Enter binary number : ");
num = br.readLine();
int dec = Integer.parseInt(num, 2);

String oct = Integer.toOctalString(dec);

System.out.println("Binary " + num + " in Octal is " + oct);

}
}

@java_codings



tgoop.com/java_codings/23
Create:
Last Update:

14. Program to Convert Binary to Octal.

import java.io.*;

class BinaryToOctal
{
public static void main(String[] args) throws Exception
{
String num = null;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

System.out.print("Enter binary number : ");
num = br.readLine();
int dec = Integer.parseInt(num, 2);

String oct = Integer.toOctalString(dec);

System.out.println("Binary " + num + " in Octal is " + oct);

}
}

@java_codings

BY Advance Java πŸ‘¨β€πŸ’»


Share with your friend now:
tgoop.com/java_codings/23

View MORE
Open in Telegram


Telegram News

Date: |

Read now Don’t publish new content at nighttime. Since not all users disable notifications for the night, you risk inadvertently disturbing them. Content is editable within two days of publishing Telegram channels enable users to broadcast messages to multiple users simultaneously. Like on social media, users need to subscribe to your channel to get access to your content published by one or more administrators. In the β€œBear Market Screaming Therapy Group” on Telegram, members are only allowed to post voice notes of themselves screaming. Anything else will result in an instant ban from the group, which currently has about 75 members.
from us


Telegram Advance Java πŸ‘¨β€πŸ’»
FROM American