Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.*;
- import java.math.*;
- public class EightOne
- {
- public static void main(String args[])
- {
- Scanner s = new Scanner(System.in);
- System.out.println("Enter number : ");
- int num = s.nextInt();
- if(num <= 5000 && num >= 1)
- {
- double square = Math.sqrt(num);
- System.out.println("Square is " + square);
- }
- else{
- System.out.println("Select number between 1 to 5000");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment