Computer Science, asked by goldencuber, 1 year ago

what is the error in the following java code

System.out.println("sqrt 100= " + Math.sqrt(100) );

whenever i try to compile the program it says error in 'Math.sqrt'
pls help

Answers

Answered by steny1
1
its not capital M but small "m"

goldencuber: still not working.
goldencuber: now it's saying ')' expected before math.sqrt.....
steny1: i think error in above lines of you're program
piyush0kumar: public class sqrt
{
void main()
{
double a;
a=Math.sqrt(100);
System.out.println("sqrt 100= "+a);
}}
piyush0kumar: just store the value in a and then display it
steny1: can you please write in a paper n send the snap
steny1: otherwise give me the question I'll solve for you
Answered by Mayankdeep301
1
its only m not M .......

goldencuber: not working.
Similar questions