signtest.c
来自「The art and science of c_source code!」· C语言 代码 · 共 26 行
C
26 行
/* * File: signtest.c * ---------------- * Reads in a number and classifies it according to its sign. */#include <stdio.h>#include "genlib.h"#include "simpio.h"main(){ int n; printf("Program to classify a number by its sign.\n"); printf("n = ? "); n = GetInteger(); if (n > 0) { printf("That number is positive.\n"); } else if (n == 0) { printf("That number is zero.\n"); } else { printf("That number is negative.\n"); }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?