📄 ex12_07.c
字号:
/*Count the number of even numbers between 0 and 100. */
#include <stdio.h>
int main( void )
{
int x = 1;
static int tally = 0;
for (x = 0; x < 101; x++)
{
if (x % 2 == 0) /*if x is even...*/
tally++; /*add 1 to tally.*/
}
printf("There are %d even numbers.\n", tally);
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -