0% found this document useful (0 votes)
23 views5 pages

Ass 1

Uploaded by

smza.24p10291
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views5 pages

Ass 1

Uploaded by

smza.24p10291
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Assignment 1

1. Write a program in prolog to print Hello World.


2. Write a program in prolog to create a database
to store 5 persons name and their Ph no. and
perform following Queries:
a. Find Ph no of Suresh
b. Search the person name who has ph no
8765432109
c. Check Ramesh has ph no. 9234567801
d. Display All person name and their Ph no.
3. Write a program in prolog to input two numbers
from user and display it.
4. Write a program in prolog to show the following
arithmetic operation between two numbers:
a. Addition
b. Subtraction
c. Multiplication
d. Division
5. Write a program in prolog to input two numbers
from user and perform following operation:
a. Modulus
b. Power
6. Write a program in prolog to check two numbers
are equal or not.
7. Write a program in prolog to find greater and
smaller number of two numbers.
8. Write a program in prolog to find Maximum and
Minimum among three numbers.

CODE:
OUTPUT:

You might also like