Question:
Send value for salary to a function called comp_net/2. The second value represents the results.
% Author:
% Date: 9/28/2010
calc:-write('Input Salary: '), nl, read(Sal), comp_net(Sal, Net), write('Net: '), write(Net).
comp_net(Sal, Net):-Gct is Sal * 0.15, Net is Sal - Gct.
Question:
Use another function called comp/2 to compare two numbers and output which is smaller.
comp(A, B):-A < B -> write(A) , write(' is smaller'); write(B) , write(' is smaller').