用C语言编"输出1-100之间不能被12整除的数"

日期:2016-01-27 00:29:40 人气:1

用C语言编"输出1-100之间不能被12整除的数"

  #include "stdio.h"   intmain()   {int x;   for(x=1;x<=100;x++)   if(x%12!=0)printf("%d\t",x);     }   直接用for循环计算1到100除以12,判断余数是否为0,是就表明可以被12整除
    A+
热门评论