📄 chickenquestion.java
字号:
public class ChickenQuestion {
/**
* @param args
*/
public static void chickenQuestion(){
/**/
for(int hens=0;hens<=100;hens++){
int m_left = 100-hens;
for(int cocks=0;cocks<=m_left/5;cocks++){
int chicks = (m_left-cocks)*3;
System.out.println(cocks+"\t"+hens+"\t"+chicks);
}
}
}
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("cocks\thens\tchicks\t");
chickenQuestion();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -