% Write a prolog program to calculate the sum of two numbers.
% So, what is the function for above mentioned problem.
sum(X,Y):-
S is X+Y,
write(S).
% Output
|
Prolog program to calculate the sum of two numbers
|
Video on Prolog Program to Calculate the Sum of Two Numbers.
Pls give me domains & predicates
ReplyDeleteDomains: X=integer and Y=integer
DeletePredicates: max(integer, integer)
sir
ReplyDeleteyou are not use any domain ,predicate and clauses keyword in program
why
plese help
ReplyDeleteWrite prolog program to find the sum of 10 integer element using recursion.???