Math.pow errors in Java

后端 未结 5 2017
天涯浪人
天涯浪人 2021-01-19 04:02

I am \'obviously\' just learning programming and I can\'t seem to figure out what to do in order to get rid if this error. The error is on the second to the last line - the

5条回答
  •  Happy的楠姐
    2021-01-19 04:25

    (((35.41 + temperature - Math.pow(windSpeed * 16) + Math.pow(temperature * 16)))

    Math.pow requires two arguments. You are providing just one.

    Did you mean Math.pow(windSpeed,16)?

    Math.pow is declared as public static double pow(double a,double b) It returns the value of the first argument raised to the power of the second argument.

    In addition you have an extra parenthesis at the left hand side.

提交回复
热议问题