pls help me will follow and mark brainliest
Attachments:
Answers
Answered by
0
Answer:
mark as brainlyiest
Explanation:
import java.util.Scanner;
public class KboatRoots
{
public static void main(String args[]) {
Scanner in = new Scanner(System.in);
System.out.print("Enter the number: ");
int num = in.nextInt();
double sqrtValue = Math.sqrt(num);
double cbrtValue = Math.cbrt(num);
long roundSqrt = Math.round(sqrtValue);
long roundCbrt = Math.round(cbrtValue);
System.out.println("Square root of " + num + " = " + sqrtValue);
System.out.println("Rounded form = " + roundSqrt);
System.out.println("Cube root of " + num + " = " + cbrtValue);
System.out.println("Rounded form = " + roundCbrt);
}
Similar questions
Math,
16 days ago
English,
16 days ago
Computer Science,
16 days ago
Math,
1 month ago
Social Sciences,
9 months ago
Math,
9 months ago