Part A) create a program that will read in one of a list of integers and test to see whether or not each one is
prime (the numbers are listed in the file "ints.txt" ).
Note the file "ints.txt" contains:
8
25
101
5001
10213
56777
765321
317971
1028743
23498271
987278023
1768374681
You must run your program one time for the entire number set. Test for EOF (or use the function feof()) to know when to stop
processing. You are to determine if each integer read is prime or not, and output the result to stdout. If a
number is prime, your output should read:
101 = 1 x 101
101: PRIME Number
For a number that turns out not to be prime, your output should read:
333 = 1 x 333 333 = 3 x 111 333 = 9 x 37 333: NOT A PRIME Number
(Note:use loops, conditionals and flags in the program)
PartB) Revise your program of Part A to handle a range of integers as specified by the user. You are to only make minor changes to your code. Such changes might include changing the state of the display_factors flag as well as changing the structure of your outer loop. In part (b), your output should now just list ONLY the prime numbers in the given range and NOT the intermediate factors OR the numbers that are not prime. Only test for ranges that have a start number greater than 3. For example, the user can request the program to find all prime numbers in the range of 900 to 1000. In this case, the output should be the following: 907: PRIME Number 911: PRIME Number 919: PRIME Number 929: PRIME Number 937: PRIME Number 941: PRIME Number 947: PRIME Number 953: PRIME Number 967: PRIME Number 971: PRIME Number 977: PRIME Number 983: PRIME Number 991: PRIME Number 997: PRIME Number
Pls Make sure to Post both Codes(part A and B) and flowchart(if u can)