Im a student whos making a simple grading system and Im struggling on how to do this when I type in a specific number it go down to else bypassing my else-if statements the numbers are 98, 67, 98, 80 …
Tag: decimal
change binary to decimal
I have to write a method that changes binary to decimal. Write a method that will convert the supplied binary digit (as a string) to a decimal number. convertToDecimal(“01101011”) = 107 convertToDecimal(“00001011”) = 11 i have created it to change decimal to binary however im not sure how to create it binary to decimal. Answer
Convert Decimal to Hex using Recursive method Java
I need to make a recursive method that converts a decimal into hexadecimal. I can’t use Integer.toHexString. EDIT:I tried this code but it doesn’t work properly Edit: Changed the default case and the if (n == 0) loop return statement and it works beautifully now. new code: Answer The problem is in your default clause: it should read: That will