Muhammet Sait Yılmaz
Date: 04.01.2024
GitHub: Muhammetyilmaz7
This C# program is a multithreaded application that classifies prime numbers, even numbers, and odd numbers using thread processing.
- Clone the repository.
- Open the project in your preferred C# development environment.
- Build and run the program.
- The program generates a list of numbers from 1 to 1000000.
- Divides the list into 4 equal parts.
- Creates threads to process each part concurrently.
- Classifies numbers into prime, even, and odd categories using separate thread-safe bags.
- Sorts and prints the results.
- The
App
function initializes the necessary data structures and threads. - The
ProcessNumbers
function classifies numbers into different categories. - The
IsPrime
function checks if a number is prime.
- Sorted lists of prime, even, and odd numbers are displayed in the console.
- Thread priorities are set, but note that the operating system may not guarantee their order.
- The elapsed time for the program's execution is also displayed.