完成习题9

This commit is contained in:
Wang Boyang 2025-04-01 16:10:06 +08:00
parent 64dd02f705
commit 6c689683c8
3 changed files with 42 additions and 0 deletions

BIN
ex9/ex9 Executable file

Binary file not shown.

41
ex9/ex9.c Normal file
View File

@ -0,0 +1,41 @@
#include <stdio.h>
int main(int argc, char *argv[])
{
int i = 25;
int j = 0;
// int i;
// while (i < 25) {
while (i > 0 || j < 30) {
printf("%d", i);
if (10 == i)
{
break;
}
// ++i;
--i;
++j;
}
while (0 != i && j > 0)
{
printf("j=%d\n", j);
--j;
if (10 == j)
{
continue;
}
}
// need this to add a final newline
printf("\n");
return 0;
}

1
ex9/vedio.txt Normal file
View File

@ -0,0 +1 @@
http://ewm.ptpress.com.cn:8085/preview?qrCode=qr2018001482&verified=true