Quantcast
Channel: inside the insight » Artificial Intelligence
Browsing all 3 articles
Browse latest View live

Image may be NSFW.
Clik here to view.

Prolog program to Calculate factorial of N

We know the formula for calculating n! (factorial of n)  is: n! = n * (n-1)! We can interpret this simple mathematical equation into a Prolog program. To do so, we must determine the basis of the...

View Article



Image may be NSFW.
Clik here to view.

Prolog program to find GCDs and LCMs

The least common multiple (LCM) of two integers a, b is the smallest positive integer that is a multiple of both a and b. Despite of the fact, there exist several formulas to calculate the LCM of two...

View Article

Image may be NSFW.
Clik here to view.

List in Prolog

It is important for any programming tool to have some functionality of handling collections like array, list or something else. Prolog use lists for the very purpose and I must warn C/C++ programmers...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images