爱因斯坦阶梯数
#include <stdio.h>
int main()
{
long n,sum,i;
while(scanf("%ld",&n)!=EOF){
printf("在1-%ld之间的阶梯数为:\n",n);
sum=0;
for(i=7;i<=n;i++){
if((i%7==0)&&(i%6==5)&&(i%5==4)&&(i%4==3)&&(i%3==2)){
sum++;
printf("%ld\n",i);
}
}
printf("在1-%ld之间共有%ld个阶梯数。",n,sum);
}
}
标签:ld,sum,13,阶梯,&&,printf,打卡,i% From: https://www.cnblogs.com/0608lin/p/17385114.html