diff --git a/2207/C语言同步练习源码/2.循环结构-6.c b/2207/C语言同步练习源码/2.循环结构-6.c new file mode 100644 index 0000000..18029bd --- /dev/null +++ b/2207/C语言同步练习源码/2.循环结构-6.c @@ -0,0 +1,13 @@ +#include + +int main(){ + + int i; + for(i=5;i<=100;i++){ + if(i%5==0 || i%7==0){ + printf("%d ", i); + } + } + + return 0; +} diff --git a/2207/C语言同步练习答案.md b/2207/C语言同步练习答案.md index d5f5b49..d9045c9 100644 --- a/2207/C语言同步练习答案.md +++ b/2207/C语言同步练习答案.md @@ -318,6 +318,19 @@ int main(){ ![image-20250220231012110](https://yp.smallkun.cn/markdown/image-20250220231012110.png!compress) ```c +#include + +int main(){ + + int i; + for(i=5;i<=100;i++){ + if(i%5==0 || i%7==0){ + printf("%d ", i); + } + } + + return 0; +} ``` ### 循环结构-7