#include <stdio.h>
void main()
{
float y;
int x;
scanf("%d",&x);
if(x!=0)
y=1.0/x;
else if(x==0)
y=0;
printf("y=%f",y);
}
计算下面的分段函数。
最新推荐文章于 2024-04-14 12:38:24 发布
#include <stdio.h>
void main()
{
float y;
int x;
scanf("%d",&x);
if(x!=0)
y=1.0/x;
else if(x==0)
y=0;
printf("y=%f",y);
}