?? iseven.c
字號:
/* * File: iseven.c * -------------- * This program prints a list of the even numbers between * 1 and 10. In an ideal implementation, constants would * be used for the limits, but this program is designed to * match the program example in the text. */#include <stdio.h>#include "genlib.h"/* Function prototypes */bool IsEven(int n);/* Main program */main(){ int i; for (i = 1; i <= 10; i++) { if (IsEven(i)) printf("%2d\n", i); }}/* * Function: IsEven * Usage: if (IsEven(n)) . . . * --------------------------- * This function returns TRUE if n is even. */bool IsEven(int n){ return (n % 2 == 0);}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -