Hi, so I am really having a difficult time with an assignment. We are supposed to use loops to open a HTML document where the user must input the name and then the program displays the text(code) of that file. Finally, we must analyze the document and output the number of tags, links, etc. in the HTML document. Since this is my first computer programming course, I am really lost on this assignment and any help would be really great!
Here's what the output program should look like:
======================================================================
HTML File Analyzer
======================================================================
Enter a valid filename (no blanks!): fred
Re-enter a valid filename: sue
Re-enter a valid filename: test.html
======================================================================
Text of the file
======================================================================
<html>
<TITLE>Course Web Page</TITLE>
This course is about programming
in C++.
<li><a href="
http://www.cs.fsu.edu/somefile.html">Click here</a>
<!-- almost done! -->
</html>
======================================================================
End of the text
======================================================================
Analysis of file
----------------
Number of lines: 9
Number of tags: 8
Number of comments: 1
Number of links: 1
Number of chars in file: 176
Number of chars in tags: 87
Percentage of characters in tags: 49.43%
======================================================================
Thanks for using the HTML File Analyzer
======================================================================
Press any key to continue . . .