代码文本:
#include "stdio.h"
#include
#include "time.h"
int main(int argc,char *argv[]){
int i,max_i,min_i;
double a[10],s;
srand((unsigned)time(NULL));
for(s=max_i=min_i=i=0;i<10;i++){
a[i]=(rand()%121+880)/10.0;//随机赋值88~100
#include
#include
#include
int main()
{ int i,max=0,min=0;
float s=0,a[10];
srand(time(0));
for(i=0; i<10; i++)
{ a[i]=(880+rand()%(1001-880))/10.0;
s+=a[i];
if(a[i]>a[max])max=i;