Argument not sufficiently instantiated

136 views Asked by At

So, I just started with Prolog, and I keep getting this error of Singleton variable (Quo,C) and Argumnets not substantially instantiated.

Quo:-
    read(A),
    read(B),
    C is A/B,
    write(C).

A simple code for finding the quotient of 2 numbers' division is made here.

1

There are 1 answers

0
Wouter Beek On BEST ANSWER

Quo is a variable (since it starts with an uppercase letter). It cannot appear as the head of a clause (i.e., the thing that precedes the :-. Replacing Quo -> quo solves your problem.