wise2.c

来自「C.Game.Programming.For.Dummies原码」· C语言 代码 · 共 21 行

C
21 行
字号
#include <stdio.h>

#define WISE 1			//Wise is TRUE
#define SILLY !(WISE)		//Silly is FALSE
#define MILTON WISE		//Milton is Wise
#define MELVIN SILLY		//Melvon is not

void main()
{
	if(MILTON==WISE && MELVIN==SILLY)
		printf("Milton is wise and Melvin is silly.\n");
	if(MILTON==SILLY || MELVIN==SILLY)
		printf("Either Mitlon or Melvin is silly.\n");
	if(MILTON==WISE || MELVIN==WISE)
		printf("Either Milton or Melvin is wise.\n");
	if(MILTON==SILLY && MELVIN==WISE)
		printf("Milton is silly and Mevlin is wise\n");
	if(MILTON==SILLY || MELVIN==WISE)
		printf("Either Milton is silly or Melvin is wise.\n");
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?