#include<stdio.h>
main()
{
int x;
printf(“please input the x:\n”);
scanf("%d",&x);
if(x==0)
printf(“y=0\n”);
else
printf(“y=%f\n”,1.0/x);
}
计算分段函数: 1/x (x≠0) y=f(x)= 0 (x=0)
最新推荐文章于 2023-04-11 11:50:12 发布
#include<stdio.h>
main()
{
int x;
printf(“please input the x:\n”);
scanf("%d",&x);
if(x==0)
printf(“y=0\n”);
else
printf(“y=%f\n”,1.0/x);
}