#include <stdio.h>
#include <conio.h>
#include <math.h> /*注意包含头文件*/
void main()
{
float x,y,a,b,c,d,h,m=0.000001; /*浮点数不能直接比较大小*/
scanf("%f%f",&x,&y);
a=(x-2.00)*(x-2.00)+(y-2.00)*(y-2.00);
b=(x+2.00)*(x+2.00)+(y-2.00)*(y-2.00);
c=(x+2.00)*(x+2.00)+(y+2.00)*(y+2.00);
d=(x-2.00)*(x-2.00)+(y+2.00)*(y+2.00);
if(a-1<=m) { h=(10.00/1.00)*(1.00-sqrt(a));printf("%f",h);}
if(b-1<=m) { h=(10.00/1.00)*(1.00-sqrt(b));printf("%f",h);}
if(c-1<=m) { h=(10.00/1.00)*(1.00-sqrt(c));printf("%f",h);}
if(d-1<=m) { h=(10.00/1.00)*(1.00-sqrt(d));printf("%f",h);}
else printf("0");
getch();
}
#include <conio.h>
#include <math.h> /*注意包含头文件*/
void main()
{
float x,y,a,b,c,d,h,m=0.000001; /*浮点数不能直接比较大小*/
scanf("%f%f",&x,&y);
a=(x-2.00)*(x-2.00)+(y-2.00)*(y-2.00);
b=(x+2.00)*(x+2.00)+(y-2.00)*(y-2.00);
c=(x+2.00)*(x+2.00)+(y+2.00)*(y+2.00);
d=(x-2.00)*(x-2.00)+(y+2.00)*(y+2.00);
if(a-1<=m) { h=(10.00/1.00)*(1.00-sqrt(a));printf("%f",h);}
if(b-1<=m) { h=(10.00/1.00)*(1.00-sqrt(b));printf("%f",h);}
if(c-1<=m) { h=(10.00/1.00)*(1.00-sqrt(c));printf("%f",h);}
if(d-1<=m) { h=(10.00/1.00)*(1.00-sqrt(d));printf("%f",h);}
else printf("0");
getch();
}
叁蓙大山:工謪、稅務、嗣發 抱歉:不回答女人的问题