摘要: /* a是一个3*4的整型数组。函数max_value求最大值max,请编写max_value函数和 main()函数,在main()函数中调用max_value函数求出3*4的整型数组的最大值并输出结果 */ #include <stdio.h> int max_value(int a[][4], 阅读全文
posted @ 2020-07-28 12:35 薄眠抛却陈年事。 阅读(414) 评论(0) 推荐(0) 编辑
摘要: //输入10个整数,按照从小到大进行排序 #include <stdio.h> # define N 10 void sort(int a[],int n){ int i,j; for(i=0;i<n-1;i++){ int k=i; for(j=i+1;j<n;j++){ if(a[k]>a[j] 阅读全文
posted @ 2020-07-28 12:00 薄眠抛却陈年事。 阅读(2218) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> /* 设计一个函数,把数字字符串转化成整数 */ int integer(char str[]){ int i,num; num=0; for(i=0;str[i]!='\0';i++){ if(str[i]<='9'&&str[i]>='0') num=num 阅读全文
posted @ 2020-07-28 11:40 薄眠抛却陈年事。 阅读(675) 评论(0) 推荐(0) 编辑