完成习题9
This commit is contained in:
parent
64dd02f705
commit
6c689683c8
|
@ -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;
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
http://ewm.ptpress.com.cn:8085/preview?qrCode=qr2018001482&verified=true
|
Loading…
Reference in New Issue