Ask your own question, for FREE!
Computer Science 14 Online
OpenStudy (anonymous):

Need help with a basic java program! Need to ask for two values (Using output box, not dialog box) then display the square root of the larger value. Format the input to display THREE PLACES (DecimalFormat). Println should look like: Enter the 1st number ---> Enter the 2nd number ---> The square root of (Larger number) is (Square root of larger number).

OpenStudy (e.mccormick):

What did you try? Where did you have trouble? Oh, and you can use a paste service like http://dpaste.com/ or http://pastebin.com/ for large blocks of code, but small blocks you can do inline between ``` lines. For example: ``` import java.util.Scanner; public class HighLow{ public static void main(String[] args){ int high=0, low=0, number; Scanner input = new Scanner(System.in); for (int i = 0; i<10; i++){ System.out.print("Input number: "); number = input.nextInt(); if (number > high) high = number; if (number < low) low = number; } System.out.println("The high number is: " + high); System.out.println("The low number is: " + low); } } ``` and: http://pastebin.com/1fVZN9CL There is the same code two different ways. You can do the same thing with your code, then people can look at it and help you with it.

Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!
Latest Questions
Arriyanalol: i need help
1 day ago 7 Replies 1 Medal
Arriyanalol: CONGRATS to me
1 day ago 8 Replies 2 Medals
Legomaster346: What colleges are good that are near Arab Alabama?
1 week ago 5 Replies 0 Medals
Arriyanalol: i need help
1 week ago 6 Replies 2 Medals
Can't find your answer? Make a FREE account and ask your own questions, OR help others and earn volunteer hours!

Join our real-time social learning platform and learn together with your friends!