爸爸买了100只家禽,鹅10元,鸭3元,鸡0.5元,爸爸共买了100只,共100元,问几只鹅,几只鸭,几只鸡用java程序算出.
网友回答
public class X {
/*** @param args
*/public static void main(String[] args) {
// TODO Auto-generated method stub
int count = 100;
float total = 100;
float er=10;
float ya=3;
float ji=.5f;
for(int i=0; i