Math.pow errors in Java -


i 'obviously' learning programming , can't seem figure out in order rid if error. error on second last line - line before: [system.out.print(+windchill);]

here (written below), list of java-generated 'possible hints' errors getting:

 **')' expected method pow in class java.lang.math cannot applied given types   required: double,double   found: double method pow in class java.lang.math cannot applied given types   required: double,double   found: double operator + cannot applied double,pow incompatible types   required: doub...** 

any hints or clarification appreciated. please see code below. thank in advance.

shane

import java.util.scanner; public class main {     public static void main(string[] args) {         // todo code application logic here         scanner input = new scanner(system.in);         system.out.print("enter temperature between -58 , 41 degrees fahrenheit , press enter");         double temperature = input.nextdouble();         system.out.print("enter wind speed 2 miles per hour or faster , press enter");               double windspeed = input.nextdouble();         double windchill = (((35.41 + temperature - math.pow(windspeed * 16) + math.pow(temperature * 16)));         system.out.print(+windchill);      }  } 

(((35.41 + temperature - math.pow(windspeed * 16) + math.pow(temperature * 16)))

math.pow requires 2 arguments. providing one.

did mean math.pow(windspeed,16)?

math.pow declared public static double pow(double a,double b) returns value of first argument raised power of second argument.

in addition have parenthesis @ left hand side.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -