永发信息网

C语言不吉利的数字

答案:2  悬赏:80  手机版
解决时间 2021-11-13 15:12
  • 提问者网友:太高姿态
  • 2021-11-13 03:11
C语言不吉利的数字
最佳答案
  • 五星知识达人网友:胯下狙击手
  • 2021-11-13 04:46
#include "stdio.h"
#include 
#include 
int main(int argc,char *argv[]){
char a[8];
int n,m,i,k,t;
printf("Please enter n & m(uint 1 ");
if(scanf("%d%d",&n,&m)!=2 || n<2 || m>1000000 || n>=m){
printf("Input error, exit...
");
return 0;
}
printf("The following is unlucky number:
");
for(t=k=0,i=n;i if(strstr(itoa(i+1000000,a,10)+1,"77") || strchr(a+1,'4'))
printf(++t%12 ? "%8s" : "%8s
",a+1);
else
k++;
if(t%12)
printf("
");
printf("
Between %d and %d issued a total of %d license plates.
",n,m,k);
return 0;
}运行样例:


全部回答
  • 1楼网友:像个废品
  • 2021-11-13 05:13
c语言不吉利数字帮写
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯