No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I have a 8 digit number that is an int, and would like to know if there is an equivalent method that i could use on it like charAt(). or a way to take just one digit out so that it is still an int value and be able to … |
|
In the following piece of code i am trying to enter a 8 digit binary number then manipulate each digit seperatly. import java.util.Scanner; public class binCoverstion2{ private static Scanner kbd = new Scanner(System.in); public static void main (String[] args){ int bit0, bit1, bit2, bit3, bit4, bit5, bit6, bit7, decNumber; System.out.println("Enter … |
|
I am writing a program that a user inputs a 8 digit binary number and I need to convert it to a decimal number. I am trying to figure out a way for the user to enter the binary number without any deleminators, but be able to manipulate each digit … |
|
For the below program: import java.util.*; public class triangleLoop { public static void main (String[] args) { int height, row, col, spa; String leftOrRight; char hyp; Scanner kbd = new Scanner(System.in); System.out.println("Enter the desired height of the triangle: "); height = kbd.nextInt(); kbd.nextLine(); System.out.println("What side do you want the hypoteneuse … |
|
I'm having trouble with this: import java.util.Scanner; public class triangleLoop { public static void main (String[] args) { int height, row, col, spa; String hyp; Scanner kbd = new Scanner(System.in); System.out.println("Enter the desired height of the triangle: "); height = kbd.nextInt(); System.out.println("What side do you want the hypoteneuse on? (left/right)"); … |