Mode:
Duration:
1
2
3
4
add(A,B,Sum) :- Sum is A + B.
% Example
?- add(10,20,S), write(S), nl.Coding works best on desktop or with an external keyboard.
add(A,B,Sum) :- Sum is A + B.
% Example
?- add(10,20,S), write(S), nl.Coding works best on desktop or with an external keyboard.
Adds two numbers and prints the result.
add(A,B,Sum) :- Sum is A + B.
% Example
?- add(10,20,S), write(S), nl.Prolog (Programming in Logic) is a high-level, declarative programming language focused on logic programming and symbolic reasoning. It is widely used in artificial intelligence, natural language processing, and rule-based systems, enabling developers to express knowledge and relationships rather than step-by-step instructions.
Origin & Creator
Developed in 1972 by Alain Colmerauer and Robert Kowalski at the University of Marseille.
Industrial Note
Prolog underpins many AI applications, including expert systems, natural language understanding, and theorem proving frameworks.