摘要:
C Primer Plus 9 函数 Promgraming Test (1)设计一个函数min(x,y)返回两个double类型值中的最小值。 #include<stdio.h>double min(double x,double y);int main(void){ double d1,d2; 阅读全文
摘要:
C Primer Plus 8 数据输入/输出和输入验证 Promgraming Test (1)在遇到EOF之前,作为字符流读取输入,要求打印每个输入字符以及其对应的ACSII十进制 #include<stdio.h>int main(void){ int counter = 0; char ch 阅读全文
摘要:
C Primer Plus 7 控制语句——分支与跳转 (1)编写一个程序,读取八个整数,并存入整型数组,倒序打印。 #include<stdio.h>#include<math.h>#include<stdlib.h>int main(void){ int data[8]; printf("En 阅读全文
摘要:
C Primer Plus 4 一、字符串和格式化输入输出 1.前导程序 \#include<stdio.h> \#include<string.h> *//提供strlen()函数原型* \#define DENSITY 62.4 *//人体密度* \#include<windows.h> 阅读全文
摘要:
C Primer Plus 5 一、运算符、表达式和语句 1、编程练习 (1)编写一条程序,把用分钟表示的时间换成用小时和分钟表示的时间。使用#define或者const创建一个表示60的符号常量或者const常量。通过while循环让用户重复输入值,直到小于等于0才停止循环。 #include<s 阅读全文