c语言用do-while语句求1至1000之间满足 "用3除余2;且用5除余3"的数,且一行只打印五个数
时间: 2023-05-28 13:05:09 浏览: 141
```c
#include<stdio.h>
int main(){
int i = 1;
int count = 0;
do{
if(i%3 == 2 && i%5 == 3){
printf("%d ", i);
count++;
if(count == 5){
printf("\n");
count = 0;
}
}
i++;
}while(i <= 1000);
return 0;
}
```
阅读全文