实验3.3

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

posted @ 2019-05-09 15:31  李天贤  阅读(94)  评论(0编辑  收藏  举报