main:-write('=========simple calculater in pp?======'),nl,
     write('Enter the first number:'),
      read(X),nl,
     write('Enter the second number:'),
     read(Y),nl,write('=====pls select the operaiton===================='),nl,
     write(' Enter "add" for addition'),nl,
     write('Enter "div" for division'),nl,
     write('Enter "mul" for multiplication'),nl,
     write('Enter "sub" for subtiration'),nl,
     write('========================'),nl,
     read(Z),tellresult(X,Y,Z),nl,
   write('u want to continue y/n?'),read(W),(W=y,main).
tellresult(X,Y,'add'):-ADD is X + Y,write('the sum of the numbers is:'),write(ADD).
tellresult(X,Y,'mul'):-MUL is X * Y,write('the multiplication of the numbers is:'),write(MUL).
tellresult(X,Y,'sub'):-SUB is X - Y,write('the subtraction of the numbers is:'),write(SUB).
tellresult(X,Y,'div'):- Y>0,DIV is X / Y,write('the division of the numbers is:'),write(DIV).