This repository contains a C program that reads a list of numbers from the "numbers.txt" file and identifies the prime numbers within the list. The program also determines the maximum prime number along with its subscript.
The C program uses the isPrime
function to check whether a given number is prime or not. The main function reads numbers from "numbers.txt" and displays the prime numbers found.
-
numbers.txt: Input file containing a list of numbers.
-
finding_prime_number.c: Main C file containing the prime number identification logic.
- The program reads numbers from "numbers.txt".
- Prime numbers are identified and displayed.
finding_prime_number.c
: Main program file.numbers.txt
: Input file with a list of numbers.
_CRT_SECURE_NO_WARNINGS
: Preprocessor directive for Visual Studio (ignores certain warnings).
isPrime
: Checks whether a given number is prime or not.
- Ensure that "numbers.txt" contains the list of numbers you want to analyze.
- Compile and run the program.
- The program will display the prime numbers found in the list.
Feel free to explore and modify the code based on your requirements.
Note: Ensure that you have a C compiler to successfully build and run the code.
Happy coding!