首页 > 代码库 > P83

P83

#include<stdio.h>
main()
{
	float x,amax,amin;
	scanf("%f",&x);
	amax=x;amin=x;
	while(x>=0)
	{
		if(x>amax)amax=x;
		if(x<amin)amin=x;
		scanf("%f",&x);
	}
	printf("\namax=%f\namin=%f\n",amax,amin);
}