public class Main{
public static void main(String[] args) {
double B = 2.5;
double dX = 0.1;
double X = 0.1;
double K;
double BX;
System.out.println("X\tK");
while (X <= 1.0) {
BX = B * X;
if (BX < 1.0) {
K = BX - Math.log(X);
} else if (BX == 1.0) {
K = 1 - Math.sqrt(BX);
} else {
K = BX + Math.log(X);
}
System.out.printf("%.1f\t%.1f\n", X, K);
X = X + dX;
}
}
}