在2000*2780的范围内可以排多少个210*189的物品,并能用图形直观表示。用程序实现的思路。上述两个尺寸可以随意设置。

解决方案 »

  1.   

     static void Main(string[] args)
            {
                int a = 2000;            int b = 2780;
                int c = 210;
                int d = 189;
                int one = 0;
                int two = 0;
                int three = 0;            one = a / c;
                two = b / d;
                three = one * two;
                Console.WriteLine("{0}", three);
                Console.ReadLine();
            }
    这个思路去写
      

  2.   

    n=(2000/210)*(2780/189)
    m=(2000/189)*(2780/210)
    if (n>m)
      return n;
    return m;