This repository contains a collection of Pascal programs that demonstrate various programming techniques. The collection includes a diverse set of programs that cover topics ranging from basic arithmetic operations to geometric shapes and prime number checking.
Each program is designed to demonstrate core programming concepts and can serve as an educational resource for anyone looking to learn Pascal or improve their coding skills.
- Even or Odd Number Check
- Print Rectengle
- Find Highest Number
- Manipulating Number List
- Positive or Negative Number Check
- Alternative Prime Number Method
- Prime Number Checking (Basic)
- Prime Number Checking (Optimized)
- Prime Number Checker
- Square Root Calculation (Advanced)
- Display Prime Numbers up to N
- Centered Triangle Shape
- Random Idea Exploration
- Centered Rectangle Shape
- Custom Rectangle Shape
- Number-Based Shape Generation
- Addition-Based Shape Generation
- Positive or Negative Number Checker
The following programs have been developed and designed by me, showcasing various Pascal programming techniques:
This program print the tringle of 1 demention by user enter number of lines want**.
This program checks if a given number is even or odd using the modulo operation (mod
).
This program identifies the highest number in a given list by comparing each element in the list.
This program manipulates a list of numbers, performing basic operations like addition, subtraction, and average calculation.
This program checks if a number is positive, negative, or zero and outputs the result accordingly.
An alternative method for determining if a number is prime, exploring a different algorithm beyond trial division.
A basic prime number checker that tests divisibility from 1
to n-1
.
An optimized version of the prime number checker, which tests divisibility only up to the square root of the number.
A classic prime number checking program using trial division up to the square root.
This program calculates the square root of a number using an advanced method, providing more accuracy and efficiency.
Generates and displays all prime numbers up to a specified limit, printing each prime number.
Draws a centered triangle on the screen using loops for precise positioning.
An experimental program that explores various ideas and algorithms, showcasing flexibility in coding.
Draws a centered rectangle on the screen with customizable dimensions.
Generates a custom rectangle shape, allowing for greater flexibility in design.
Generates geometric shapes based on numbers, forming patterns such as triangles, squares, etc.
This program generates shapes or patterns based on arithmetic operations between numbers.
Checks if a number is positive, negative, or zero and prints the result accordingly.
To run these programs on your local machine:
- Install a Pascal compiler (e.g., Free Pascal or Turbo Pascal).
- Open the
.pas
file in your Pascal IDE or text editor. - Compile and run the program to see the output.
These programs are open-source and intended for educational purposes. Feel free to fork, modify, and use them as needed.
Contributions are welcome! If you want to improve any of the programs, feel free to submit pull requests or open issues.