摘要: //形参改变实参#includevoid change(int *n);int main(){ int a = 90; change(&a); printf("%d\n",a); return 0;}void change(int *n){ *n = 10;} 阅读全文
posted @ 2015-03-07 21:19 稳稳稳稳稳稳 阅读(333) 评论(0) 推荐(0) 编辑
摘要: #includeint sumAndminus(int n1, int n2, int *n3);int main(){ int a = 10; int b = 7; int he; int cha; he = sumAndminus(a,b,&cha); pri... 阅读全文
posted @ 2015-03-06 21:20 稳稳稳稳稳稳 阅读(660) 评论(0) 推荐(0) 编辑
摘要: Exercise 6-1. write a program that will prompt for and read a positive integer less than1,000 from the keyboard, and then create and output a string t... 阅读全文
posted @ 2014-12-28 22:49 稳稳稳稳稳稳 阅读(281) 评论(0) 推荐(0) 编辑
摘要: 从输出结果来看,这个程序是错的。完全不知道什么意思。Exercise 5-5. Write a program that will calculate the average grade for the students ineach of an arbitrary number of classe... 阅读全文
posted @ 2014-12-28 19:14 稳稳稳稳稳稳 阅读(295) 评论(0) 推荐(0) 编辑
摘要: Exercise 5-4. Define a two-dimensional array, data[11][5] , of type double. Initializethe elements in the first column with values from 2.0 to 3.0 inc... 阅读全文
posted @ 2014-12-28 18:30 稳稳稳稳稳稳 阅读(252) 评论(0) 推荐(0) 编辑
摘要: Exercise 5-3. Write a program that will read five values from the keyboard and storethem in an array of type float with the name amounts. Create two a... 阅读全文
posted @ 2014-12-27 16:52 稳稳稳稳稳稳 阅读(217) 评论(0) 推荐(0) 编辑
摘要: Exercise 5-2. Define an array, data, with 100 elements of type double. Write a loop thatwill store the following sequence of values in corresponding e... 阅读全文
posted @ 2014-12-19 12:13 稳稳稳稳稳稳 阅读(226) 评论(0) 推荐(0) 编辑
摘要: Exercise 5-1. Write a program that will read five values of type double from the keyboardand store them in an array. Calculate the reciprocal of each ... 阅读全文
posted @ 2014-12-18 19:19 稳稳稳稳稳稳 阅读(468) 评论(1) 推荐(0) 编辑
摘要: Recommendation:Exercise 4-1. Write a program that will generate a multiplication table of a size entered by the user. a table of size 4, for instance,... 阅读全文
posted @ 2014-12-18 18:49 稳稳稳稳稳稳 阅读(488) 评论(0) 推荐(0) 编辑
摘要: 1. 取模运算时,将两个数字从double 转换为long,因为c语言中%运算只能用于整数。 阅读全文
posted @ 2014-12-18 11:58 稳稳稳稳稳稳 阅读(327) 评论(1) 推荐(0) 编辑