Advertisement
Guest User

AI Lab

a guest
Nov 17th, 2017
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.55 KB | None | 0 0
  1. add:-sum,nl.
  2.  
  3. sum:- write('Enter A='),read(A),
  4.     write('Enter B='),read(B),
  5.     S is A+B,
  6.     write('Sum of A+B='),write(S).
  7.  
  8.  
  9. sub:-subt,nl.
  10.  
  11. subt:- write('Enter A='),read(A),
  12.     write('Enter B='),read(B),
  13.     S is A-B,
  14.     write('Subtraction of A-B='),write(S).
  15.  
  16.  
  17. mul:-mult,nl.
  18.  
  19. mult:- write('Enter A='),read(A),
  20.     write('Enter B='),read(B),
  21.     S is A*B,
  22.     write('Multiplication of A*B='),write(S).
  23.  
  24.  
  25. and mod
  26. //
  27.  
  28.  
  29. div:-divi,nl.
  30.  
  31. divi:- write('Enter A='),read(A),
  32.     write('Enter B='),read(B),
  33.     S is A/B,
  34.     write('Division of A-B='),write(S).
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement