Linux-C基础知识学习:C语言作业-把100~200之间的不能被3整除的数输出

Linux基础知识学习
C语言作业:把100~200之间的不能被3整除的数输出

//把100~200之间的不能被3整除的数输出
#include <stdio.h>
main(){
int i,count=0;
printf("找出100~200之间的能被3整除的数···\n");
for(i=100;i<=200;i++)
{
if(i%3 != 0){
printf("%5d",i);
count ++;
}
if(count==5)
{
count = 0;
printf("\n");//每五个数字,一行
}
}
printf("\n");
}

这里写图片描述
这里写图片描述

posted @ 2016-09-12 14:13  大山606  阅读(436)  评论(0编辑  收藏  举报