1. 程式人生 > 其它 >No Hibernate Session bound to thread, and configuration does not allow creation of non-transactiona

No Hibernate Session bound to thread, and configuration does not allow creation of non-transactiona

技術標籤:c語言

計算下面的分段函式。
在這裡插入圖片描述

#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);	
}