icompatible types
When i debug this i get the incompatable types error where the ^ are
I know there are more errors than that but its just this is the first problem and the double thing i think its worn i was just trying different float and integer types and that is when i got fed up
//SLOPE
import java.io.*;
publicclass SLOPE{
publicstaticvoid main(String args [ ]){
String one;
String two;
String three;
String four;
double rise, run, slope;
BufferedReader reader;
reader =new BufferedReader(new InputStreamReader(System.in));
System.out.print("\nThe first x = ");
try{
one= Double.parseDouble(reader.readLine( )) ;
^
System.out.print("The first y = ");
two = Double.parseDouble(reader.readLine( )) ;
^
System.out.print("The second x = ");
three= Double.parseDouble(reader.readLine( )) ;
^
System.out.print("The second y = ");
four = Double.parseDouble(reader.readLine( )) ;
^
rise = (four - three);
run = (two - one);
slope = (rise / run);
}
catch (IOException ioe){
System.out.println("Error");
}
catch (NumberFormatException nfe){
System.out.println("Error");
}
System.out.println("the rise = " + rise) ;
System.out.println("the run = " + run );
System.out.println("the slope = " + slope);
reader.close( );
}
}

