Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com;
- import java.util.Scanner;
- public class ReadNumber
- {
- public static void main(String[] args)
- {
- Scanner scanner = new Scanner(System.in);
- double inputNum= Double.parseDouble(scanner.nextLine()); //TO DO check the input is negative zero or not a number
- double output = Math.sqrt(inputNum);
- System.out.printf("%.5f",output);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement