c语言,输入十个整数,要求用到冒泡算法,输出最大值最小哦值,再去掉最...答:include "stdio.h"int main(int argc,char *argv[]){int n,s,min,max,t;printf("Please enter 10 integers...\n");for(s=n=0;n<10;n++){scanf("%d",&t);if(max<t || n==0)max=t;if(min>t || n==0)min=t;s+=t;}printf("\nThe MAX = %d\nThe MIN = %d\nThe...
编程,从键盘输入10个元素放到整型数组a[],并从中找出最大的元素及下标...答:include <stdio.h> main(void){ int a[10],max,min,p,k,i;scanf("%d",&a[0]);max=min=a[0];for(i=1;i<10;i++){ scanf("%d",&a[i]);if(maxa[i]){min=a[i];p=i;} } printf("最大元素是:%d,下标是:%d\n最小元素是:%d,下标是:%d\n",max,k,min,p);} ...