Language: JAVA
Problem 1: Decimal to Binary Conversion
Write a program that takes an integer value as an input and converts that value to its binary representation; for instance, if the user inputs 17, then the output will be 10001.
Do not forget to check for valid input, which means if the user inputs a type of data other than an integer re-prompt the user to enter a valid value. The output binary number can be a string.
Sample input and output:
Enter an integer > a
You entered an invalid type. Try again.
Enter an integer > 17
10001
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here