#include <iostream> int main() { float arr[10]; int i; float max; int maxindex; for (i = 0; i <= 9; i++) { scanf_s("%f/n", &arr[i]); }max = arr[0]; for(i=1;i,10;i++) {if (max<arr[i]) { max = arr[i]; maxindex=i } } printf("%d,%sf\n", i,max); return 0; }
标签:10,int,最大值,float,查询,数组 From: https://www.cnblogs.com/zqyqz/p/17408893.html