⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gongyue.bak

📁 人工智能课程学习中的作业
💻 BAK
字号:
domains
	int=integer
predicates
	gcd(int,int,int)
	lcm(int,int,int)
clauses		   
	gcd(X,0,X):-!.
	gcd(X,_,0):-X<0,!,write("X<0 is wrong").
	gcd(_,Y,0):-Y<0,!,write("Y<0 is wrong").
	gcd(X,Y,Z):-R=X mod Y,gcd(Y,R,Z).
	lcm(X,Y,Z):-gcd(X,Y,R),Z=X*Y/R.
goal
	write("Input the X and Y:"),nl,
	write("X= "),readint(X),nl,
	write("Y= "),readint(Y),nl,
	gcd(X,Y,R),write(R),nl,
	lcm(X,Y,L),write(L).
	

	

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -