static void Main(string[] args)
        {
            int n = 0;
            for (int x = 1; x*15 <=200; x++)
            {                                                             可能性*可能性*可能性=全部可能性,从中找出符合条件的就OK(if);
                for (int y = 1; y*3 <=200; y++)
                {
                    for (int z = 1; z*2 <= 200; z++)
                    {
                        if (x*15+y*3+z*2==200)
                        {
                            Console.WriteLine("羽毛球的结果为"+x+"球的结果为"+y+"水的结果为"+z);
                            n++;
                        }
                    }
                }
            }
            Console.WriteLine("一共有"+n+"种可能性");

            Console.ReadLine();
        }

相关文章:

  • 2021-09-18
  • 2021-10-12
  • 2021-10-11
  • 2022-12-23
  • 2022-12-23
  • 2021-04-12
  • 2021-07-30
猜你喜欢
  • 2021-11-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-30
相关资源
相似解决方案