首页 > 试题广场 >

编写一个程序,输出100以内不能被7整除的数。

[问答题]
编写一个程序,输出100以内不能被7整除的数。

推荐
#include <stdio.h>
void main()
{
    int n;
    for(n=1;n<=100;n++)
    {
        if(n%7==0) continue;
        printf("%d",n);
    }
}

发表于 2018-05-06 21:56:45 回复(0)