java百元百雞問題

/** * * 百元百雞問題:公雞5元一隻,母雞3元一隻,3只小雞1元, * 若是用100元錢,買100只雞,不佘不欠,能夠買公雞,母雞,小雞,各多少隻。 * */ public class Demo{ public static void main(String[] args) { int x; int y; int z; for(x = 0 ; x <=
相關文章
相關標籤/搜索