/Random--Access--File--in--JAVA

I had an Assignment on Random access file in JAVA, was tough to find on net, so thought to share with others too:)

Primary LanguageJava

Random--Access--File--in--JAVA

PROBLEM : A random access file contains integers. Write a program that reads the file and replaces all the integers that are square free semi prime( factors of the number are prime ) to 0 and also counts the number of such replacements.

Semi prime

4 – factors ( 2 ) but not square free 2 * 2 = 4( should not be included)

6 – factors( 2,3 ) square free( included)

9 – factor (3) not square free ( 3 * 3 ) = 9(should not be included)

15 – factors( 5, 3) square free(included)