Question: Write a program that will satisfy the following: 1. The program should be able to read the contents of a file named colorcode.txt. The file
Write a program that will satisfy the following: 1. The program should be able to read the contents of a file named colorcode.txt. The file contains the resistor color code table from the web page: "https://www.allaboutcircuits.com/textbook/reference/chpt-2/resistor-color-codes/Links to an external site.". You can separate the items per row using commas. 2. When the program reads the text files contents, it should store the information of each column in the table in a separate 1D array of the appropriate type. The color information should be stored in a 1D array of strings. The rest of the information can be numeric 1D arrays. For items that are blank in the table, just put the value 0 (zero). 3. The program should print the contents of the arrays so that it displays the table on the screen. 4. The main() function should only contain variable declarations and functions calls. This means that you have to implement program functionality using user-defined functions. (this requirement is worth 20% of 100%; if you don't satisfy this, your program will get a maximum grade of 80% of 100% only)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
