Write a program to take a number from the user and find its cube root.
Answers
Answered by
1
Answer:
This is done in QBASIC
CLS
PRINT "ENTER A NUMBER"
INPUT N
C=N^1/3
PRINT "CUBE ROOT"
PRINT C
END
Can i be brainliest?
Answered by
3
Question:-
➡ Write a program to take a number and find it's cube root.
Program:-
I am writing in Java. From the next time, mention the programming language too.
import java.util.*;
class Cbrt
{
public static void main(String s[])
{
Scanner sc=new Scanner(System.in);
System.out.print("Enter a number: ");
double n=sc.nextDouble();
n=Math.cbrt(n);
System.out.println("Cube root of the number is: "+n);
}
}
Similar questions