- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmathOperation3.java
More file actions
Latest commit
16 lines (15 loc) · 610 Bytes
/
Copy pathmathOperation3.java
File metadata and controls
16 lines (15 loc) · 610 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// utility imports...
classmathOperation3 {
publicstaticvoidmain(String[] args) {
// Scanner object...
Scannerinput = newScanner(System.in);
// taking input...
System.out.print("Enter a number: ");
// input section..
doublea = input.nextDouble(); // the output of the Square root will be a floating value..
// math operation to verify the square root of the number...
doublefind = (double) (Math.sqrt(a));
// displaying output...
System.out.println("Sqaure Root of the number is: " +find);
input.close(); // if doesn't,, the resource will be leaked...
}