Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class ScannerTest {
  4. public static void main(String[] args) {
  5. Scanner scann = new Scanner(System.in);
  6.  
  7. System.out.println("Enter your number:");
  8. int a = scann.nextInt();
  9. double result = Math.sqrt(a);
  10. System.out.println(a);
  11. System.out.printf("'%.5f'%n", result);
  12.  
  13.  
  14.  
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement