C语言编程:用指针表示法给一维数组元素输入值,输出各元素的值及元素之...答:include <stdio.h> int main(){ int a[6],i,sum,*p;printf("Please input data of a[6]:\n");for(i=0,p=a;i<6;++i)scanf("%d",p++);printf("Output arry:\n");for(i=0,sum=0,p=a;i<6;++i){ printf("%d ",*p);sum+=*p++;} printf("\ns=%d\n",sum);return ...
用C语言编程实现输入数组,最大的与第一个元素交换,最小的与最后一个元 ...答:include<stdio.h> void main(){ int a[100], n, i;int max, min, temp;int *p, *pmax, *pmin;printf("要输入几个数:");scanf("%d", &n);for(i=0; i<n; i++)scanf("%d", a+i);max=*a; min=*a; p=a;for(i=0; i<n; i++)if(*(p+i)>=max) {pmax=p+i...