Telegram Group & Telegram Channel
9. Program to Calculate Binary Number Calculation.

import java.util.*;

class BinaryCalculator
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);

System.out.print("First Binary: ");
String binOne = in.next();

System.out.print("Second Binary: ");
String binTwo = in.next();

int left = Integer.parseInt(binOne, 2);
int right = Integer.parseInt(binTwo, 2);

System.out.println("Sum of the binary numbers : " + Integer.toBinaryString(left + right));
System.out.println("Difference of the binary numbers : " + Integer.toBinaryString(left - right));
System.out.println("Product of the binary numbers : " + Integer.toBinaryString(left * right));
System.out.println("Quotient of the binary numbers : " + Integer.toBinaryString(left / right));
}
}

@java_codings



tg-me.com/java_codings/13
Create:
Last Update:

9. Program to Calculate Binary Number Calculation.

import java.util.*;

class BinaryCalculator
{
public static void main(String[] args)
{
Scanner in = new Scanner(System.in);

System.out.print("First Binary: ");
String binOne = in.next();

System.out.print("Second Binary: ");
String binTwo = in.next();

int left = Integer.parseInt(binOne, 2);
int right = Integer.parseInt(binTwo, 2);

System.out.println("Sum of the binary numbers : " + Integer.toBinaryString(left + right));
System.out.println("Difference of the binary numbers : " + Integer.toBinaryString(left - right));
System.out.println("Product of the binary numbers : " + Integer.toBinaryString(left * right));
System.out.println("Quotient of the binary numbers : " + Integer.toBinaryString(left / right));
}
}

@java_codings

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


Warning: Undefined variable $i in /var/www/tg-me/post.php on line 283

Share with your friend now:
tg-me.com/java_codings/13

View MORE
Open in Telegram


Advance Java ‍ Telegram | DID YOU KNOW?

Date: |

How Does Telegram Make Money?

Telegram is a free app and runs on donations. According to a blog on the telegram: We believe in fast and secure messaging that is also 100% free. Pavel Durov, who shares our vision, supplied Telegram with a generous donation, so we have quite enough money for the time being. If Telegram runs out, we will introduce non-essential paid options to support the infrastructure and finance developer salaries. But making profits will never be an end-goal for Telegram.

Mr. Durov launched Telegram in late 2013 with his brother, Nikolai, just months before he was pushed out of VK, the Russian social-media platform he founded. Mr. Durov pitched his new appβ€”funded with the proceeds from the VK saleβ€”less as a business than as a way for people to send messages while avoiding government surveillance and censorship.

Advance Java ‍ from sg


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