package com.zuoye.test;//百鸡百钱5文钱可以买一只公鸡,3文钱可以买一只母鸡,1文钱可以买3只雏鸡.public class Baiji { public static void main(String[] args) { int a; int b; int c; int sum; for(a=0;a<21;a++) { for(b=0;b<30;b++) { for(c=0;c<100;c++) { sum=5*a+3*b+c/3; if(sum==100&am…
//百钱买百鸡public class baiqianbaiji { static void BQBJ(int m,int n)//m为钱的总数,n为鸡数 { int z; for(int x = 0;x <= n;x++){ for(int y = 0;y <= n; y++){ z = n- x - y; if(z >= 0 && z % 3 == 0 && m == x * 5 + y * 3 + z / 3) System.out.printf(&…
Oracle百问百答(四) 31.怎样查看某用户下的表? select table_name from all_tables where owner=upper('jhemr'); 32.怎样查看某用户下的表空间? (1)select tablespace_name from dba_tables where table_name='EMP' and owner=upper('jhemr');(表+用户) (2)select table_name,tablespace_name from dba…
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApp100鸡 { class Program { static void Main(string[] args) { Console.WriteLine("用百元钱买百只鸡,公鸡每只5元,母鸡每只3元,小鸡1元3只~那么它们各是几只?"); ; ; a <= max / ;…
问题:公鸡一仅仅5元,母鸡一仅仅3元,小鸡三仅仅1元.问100元能够买多少仅仅鸡? using System; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { int z, i=0; for (int x = 0; x < 20; x++) for (int y = 0; y < 33; y++) { z = 100 - x - y; if (5 * x + 3 * y + z…
需求说明: 用100文钱买鸡,公鸡5文钱一只,母鸡3文钱一只,小鸡3只1文钱,要求公鸡.母鸡.小鸡都必须要有,刚好用完100文钱,公鸡.母鸡.小鸡的数量之和也是100. public class test { public static void main(String[] args) { int cock,hen,chicken;//公鸡,母鸡,小鸡 for(cock=1; cock<=20; cock++){ for(hen=1; hen<=33; hen++){ for(chicken=…