I\'m new to Java. I wrote the following code:
import java.io.*; import java.lang.*; public class distravel { public static void main(String args[])
d=((u*t)+a*Math.pow(t,x))/2F;
should be
d=(float)((u*t)+a*Math.pow(t,x))/2F;
or declare d as double as GrahamS suggested.
d
double