write a java program ti read a number via tge scanner class and display its square, cube, square root and cube root
Answers
Answered by
1
Answer:
Okkkkkkkk..
Mark me as brainlliest &follow
Answered by
0
Answer:
import java.util.*;
public class Main
{ public static void main(String[] args) {
Scanner s=new Scanner(System.in);
System.out.println("enter the number");
int a=s.nextInt();
System.out.println("square of number is"+a*a);
System.out.println("square of number is"+a*a*a);
System.out.println("square of number is"+Math.sqrt(a));
System.out.println("square of number is"+Math.cbrt(a));
}
}
Similar questions