pascal program for demonstration