我的代码:在控制台司两个静态整数总是返回0%的比例
public class Test {
public static int l = 29;
public static int w = 16;
public static int total = w + l;
public static int result = w/total;
public static int Result = total * 100;
public static void main(String[] args) {
System.out.println("You're W/L ratio is: " + (Result) + "%"); // Display the string.
}
}
响应:你是W/L比为:0%