c语言5-3

#include<stdio.h>
int main(){
    int a,b,c,s,t=0;
    for(a=1;a<6;a++){
        for(b=1;b<6;b++){
            for(c=1;c<6;c++){
       
                s=100*a+10*b+c;
                if(a!=b&&b!=c&&a!=c){
    
                printf("%d\n",s);
                t++;}
            }
        }
    }
    printf("%d\n",t);
    return 0;
}

posted @ 2019-05-06 14:02  p201821440019  阅读(244)  评论(0编辑  收藏  举报