Auto commit

This commit is contained in:
smallkun 2025-02-21 08:31:41 +08:00
parent e3beb59bcf
commit 4e52aad31a
2 changed files with 44 additions and 0 deletions

View File

@ -0,0 +1,22 @@
#include <stdio.h>
/*
:i
:j
:k
*/
int main(){
int i, j , k;
for(i=0;i<=33;i++){
for(j=0;j<=50;j++){
for(k=0;k<=200;k+=2){
if(i+j+k==100 && i*3 + j*2 + k/2 == 100){
printf("大马:%-2d 中马:%-2d 小马:%-2d\n", i, j, k);
}
}
}
}
return 0;
}

View File

@ -224,6 +224,28 @@ int main(){
![image-20250220230952843](https://yp.smallkun.cn/markdown/image-20250220230952843.png!compress)
```c
#include <stdio.h>
/*
大马:i
中马:j
小马:k
*/
int main(){
int i, j , k;
for(i=0;i<=33;i++){
for(j=0;j<=50;j++){
for(k=0;k<=200;k+=2){
if(i+j+k==100 && i*3 + j*2 + k/2 == 100){
printf("大马:%-2d 中马:%-2d 小马:%-2d\n", i, j, k);
}
}
}
}
return 0;
}
```
### 循环结构-4