/* Note:Your choice is C IDE */
#include "stdio.h"
main()
{ double a[10];
int i;
int u=0;
double max;
for(i=0;i<10;i++)
scanf("%lf",&a[i]);
max=a[0];
for(i=1;i<10;i++)
{if(max<a[i])
{ max=a[i];
u=i;}}
printf("the max is %lf",max);
printf("and the suoyin of the max is %d\n",u);
}
最大值的索引
最新推荐文章于 2024-01-04 15:31:46 发布