Wite a program that satisfies the requirements of


Required Setup and Tools

  • Standard computer lab with Pelles C and Microsoft Visio installed
  • Textbook

 Recommended Procedures:

Write a program that satisfies the requirements of Programming Project 2 of Hanly, and that uses the following modifications and tips:

  • Use the COLOR_CODES string array.
  • Instead of restricting the user input to "no caps", use the string library function strlwr() to change the input to all lower case.
  • If the user input is the word "purple", replace it with the word "violet".
  • If the user input is the word "grey", replace it with "gray".
  • Instead of printing the resistance value in kilo-ohms, if the resistance value is less than 1000 ohms, print the resistance in ohms; if the resistance value is less than 1000000 (1 million) ohms, print the resistance in kilo-ohms; otherwise, print the resistance value in Mega-ohms.
  • You may want to refer to the Lab Assignment Task 3 from Unit 4 (Resistor classification lab).
  • Start with the skeleton program provided below. Fill in the header in the usual manner. 

Build your program and fix any errors. Test your program with a variety of resistor color codes, making sure you test resistances below 1k ohm, between 1k ohm and 1M ohm, and above 1M ohm. Make sure you test using both the words "violet" and "purple", as well as "gray" and "grey". Make sure you test using upper- and lowercase color names.

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Wite a program that satisfies the requirements of
Reference No:- TGS0931208

Expected delivery within 24 Hours