Theres probably a lot of things wrong with this code but I can probably handle the rest, I just need to know how to fix the error "incompatible types: possible lossy conversion from double to int"
public class assignment5_3
{
public static void main(String[] args)
{
//System.out.println("The falling distance is "+d+" when time is "+t);
for (int t = 1; t < 10; t++)
{
double result = fallingDistance();
}
}
public static int fallingDistance()
{
double g = 9.8;
int t = 5;
double d = (1/2)*g*t*t;
return(d);
}
}