Showing posts with label simple program. Show all posts
Showing posts with label simple program. Show all posts

Thursday 9 May 2019

Simple Dinamic Programming in Prolog

Hai...how are you?
Remember in Simple Programming In Prolog
We can make a simple programming in prolog  more dymanic. This program used  two Predikat Built-In, write( ) and read ( ). The purpose of making this program is to involve users in the calculation process, attention to the this program:

%fact
 
% rule
start:- write('This is a Simple Program in Prolog'),nl,
          write('Enter length of Rectangular: '),read(L),
          write('Enter width of Rectangular: '),read(W),
          Rectangular_Area is W*L,
          write('Length of rectangular Entered: '),write(L),nl,
          write('Width of Rectangular Entered: '),write(W),nl,
          write('Rectangular Area: '),write(Rectangular_Area).