1) Read the text from the file
2) Iterate over each line in the file
3) Check whether the line ends in an 'n' or 'N'
4) If it does, increment a counter.
@jlb Honestly I cant figure out any way to do this.
My teacher though had told me about taking the line as string and using strlen function to count the number of characters and then compare the last character with 'n' or 'N' and increment "count(variable that stores the number of lines)" if its is equal to 'n' or 'N'.
But my problem is how to read the last character of a line?