对了,题我看错了,下面的我打印了最小值,改下就可以
#include <stdio.h>
#define MAX 3
int max;
int min;
int main()
{
int i;
int Original[MAX+1];
double Inverted[MAX+1];
for (i=1;i<=MAX;i++)
{
scanf("%d",&Original[i]);
Inverted[i]=1/double(Original[i]);
}
max=Original[1];
min=Original[1];
for (i=2;i<=MAX;i++)
{
if(Original[i]>max)
max=Original[i];
if (Original[i]<min)
min=Original[i];
}
printf("Original values:");
for (i=1;i<=MAX;i++)
printf("%d
",Original[i]);
printf("[%d]\n",max);
printf("Inverted values:");
for (i=1;i<=MAX;i++)
printf("%.2f
",Inverted[i]);
printf("[%.2f]\n",1/double(min));
return 0;
}