expected ';' in a simple arithmetic operation in java -
i don't know exactly, think it's way wrote operation
public class temperatureconversion { public static void main( string [] args) { //freezing point constant final int freezing_point = 32; //fahrenheit input int fahrenheit = 75; //fahrenheit celsius conversion double celsius =(fahrenheit- freezing_point)9.0/5.0;
error: ';' expected double celsius =(fahrenheit- freezing_point)9.0/5.0;
the marker points @ 9
you missing operator, assume intended multiplication (it not implied). change
double celsius =(fahrenheit- freezing_point)9.0/5.0;
to
double celsius =(fahrenheit- freezing_point)*9.0/5.0;
Comments
Post a Comment