zoukankan      html  css  js  c++  java
  • 有1,2,3,4个数,能组成多少个互不相同且无重复数字的三位数.

    #include <stdio.h>
    int main()
    {          /*有1,2,3,4个数,能组成多少
                个互不相同且无重复数字的三
                位数分别是多少。
                程序分析:百位十位个位上的
                数字分别是1,2,3,4,先全部排
                列出来,再去掉不满足条件的*/
        int i,j,k;
        for (i=1;i<5;i++)
            for (j=1;j<5;j++)
                for (k=1;k<5;k++)
                {
                    if (i!=j&&i!=k&&j!=k)
                    printf("%d%d%d\n",i,j,k);
                }
                getch();
                return 0;
    }

  • 相关阅读:
    合并字符串中的多个空格
    IfcSpecularRoughness
    IfcSpecularExponent
    IfcPresentableText
    IfcFontWeight
    IfcFontVariant
    uwb ifc模型定位測試
    IfcFontStyle
    IfcGeometricModelResource
    qt6安装
  • 原文地址:https://www.cnblogs.com/wangjingyuwhy/p/2941944.html
Copyright © 2011-2022 走看看