日期:2014-05-20 浏览次数:20619 次
package com.c813; public class Test { public static void main(String[] args) { for (int i = 0; i < 17; i++) { for (int j = 0; j < 16; j++) { if (i*3 + j*2 + 30 - i - j == 50) { System.out.println("男人:" + i + " " + "女人:" + j + " " + "小孩:" + (30 - i - j)); } } } } }