program8_02.c
来自「C语言入门经典一书的所有代码。书上面的所有代码均在此。希望大家喜欢」· C语言 代码 · 共 19 行
C
19 行
/* Program 8.2 More scope in this one */
#include <stdio.h>
int main(void)
{
int count = 0; /* Declared in outer block */
do
{
int count = 0; /* This is another variable called count */
++count; /* this applies to inner count */
printf("\ncount = %d ", count);
}
while( ++count <= 8 ); /* This works with outer count */
/* Inner count is dead, this is outer */
printf("\ncount = %d\n", count);
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?