⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 iseven.c

📁 The art and science of c_source code!
💻 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 + -