摘要: 知识点: 1.一维数组的定义 数组的变量名 数组元素的类型和数组的大小 2.一维数组的引用 引用前必须先定义再引用 数组只能逐个引用,不能一次引用多个元素 3.一维数组的初始化 在定义数组时对数组赋初值,一般形式为:int a[10]={1,2,3,4,5,6,7,8,9,10}; 阅读全文
posted @ 2016-11-16 11:32 BGD160809421 阅读(110) 评论(1) 推荐(0) 编辑
摘要: #include int main() { double x,sum=0,ave; int i; for(i=0;i #include int main() { double x,cost; printf("输入一个x:"); scanf("%lf",&x); if(x>0&&x50) printf("cost=%.2f\n",co... 阅读全文
posted @ 2016-11-16 10:57 BGD160809421 阅读(151) 评论(0) 推荐(0) 编辑