java鸡兔同笼
鸡兔同笼,35个头,94个足,分别求出? public static void main(String[] args){ int rabbit=0; int chicken=0; if(rabbit+chicken==35&&2*chicken+4*rabbit==94){ System.out.println(rabbit+" "chicken); } } } 这样为什么不行呀?
鸡兔同笼,35个头,94个足,分别求出? public static void main(String[] args){ int rabbit=0; int chicken=0; if(rabbit+chicken==35&&2*chicken+4*rabbit==94){ System.out.println(rabbit+" "chicken); } } } 这样为什么不行呀?
2016-06-19
举报