个位是6的五位数中能被三整除的数有多少个,分别是?

#include<stdio.h>
main()
{
int i=1000,geshu=0;
while(i<=9999)
{
while((i*10+6)%3==0)
{
printf("%d\n",i*10+6);
i++;
geshu++;
}
i++;
}
printf("5位数中能被3整除的个数为:%d",geshu);

}


一次成功

猜你喜欢

转载自blog.csdn.net/a374519711/article/details/80855525