I have a text file called dna.txt which contains ACGGTGCTGTATCCATATCCGTTAACTCTCTTGTGTCACC. I want to count the occurrences of characters C and G in the text file, and the length of the original string.
I want the program to read the input from a text file in the same folder as it is saved (on Windows).