Java求解“鸡兔同笼问题” public class Jttl { public static void main(String[] args) { int jt = 0 ; while (jt<99){ if (jt*4 + (40-jt)*2 == 100) { System.out.println("兔有"+jt+"只"); System.out.println("鸡有"+(40-jt)+"只"); break; } jt++; } } }