lind5-10.c
来自「谭浩强第二版的课后习题的答案的源程序」· C语言 代码 · 共 14 行
C
14 行
#include<stdio.h>
main()
{
float x,y,height,a,b,c,d;
lin: printf("\nPlease input the coordinate of the point.\n");
scanf("%f,%f",&x,&y);
a=(x-2)*(x-2);
b=(x+2)*(x+2);
c=(y-2)*(y-2);
d=(y+2)*(y+2);
a+c<=1||a+d<=1||b+c<=1||b+d<=1 ? (height=10):(height=0);
printf("The height is %.0f\n",height);
goto lin;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?