show dbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.text.DecimalFormat; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner in = new Scanner(System.in); | |
System.out.println("Please enter in a number to find its square root value: "); | |
double x = in.nextDouble(); // User inputs a number to find the square root | |
// Prints the square value of the input and formats the input and output to two decimal places: |