摘要: 1 #include<stdio.h>int main(){double x,sum=0,ave;int i;for(i=0;i<4;i++){scanf("%lf",&x);sum=sum+x; } ave=(sum/4);printf("sum=%.1lf,ave=%.1lf\n",sum,av 阅读全文
posted @ 2016-11-16 14:45 江超民 阅读(133) 评论(1) 推荐(0) 编辑
摘要: 一、知识点 1.一维数组的定义 ·定义方式: 类型名 数组名[整型常量表达式]; 例:int a[10]; · 说明:① 数组名的命名规则和变量名相同,遵循标识符命名规则 ② 数组名后的常量表达式用[ ]括起来。 ③ 常量表达式表示元素的个数,即数组长度。 例: a[10]表示数组a中包括10个元素 阅读全文
posted @ 2016-11-16 11:16 江超民 阅读(215) 评论(0) 推荐(0) 编辑