//7. 计算分段函数:
// {1/x(x≠0)
//y=f(x)={
// {0(x=0)
#include<stdio.h>
main()
{
float a;
scanf("%f",&a);
if(a!=0)
printf("%.5f\n",1/a);
else
printf("%f\n",a);
}
运行结果:
标签:5f,scanf,float,C语言,printf,100,main
来源: https://blog.csdn.net/qq_51909288/article/details/113002089