Question: Computer programming Convert using Engineering Prefixes The goal for this assignment is to write a computer program that will tell the user which engineering prefix
Convert using Engineering Prefixes The goal for this assignment is to write a computer program that will tell the user which engineering prefix should be used based on the size of the number. When using engineering notation, the number should always be between 1 and 999 inclusive regardless of the power of ten needed to multiply by to represent the number. When using engineering prefixes, the power of ten is always a multiple of three. The following table indicates the range of numbers that correspond to each of the engineering prefixes to be covered by this program. Note, this program will not be covering numbers that would use the prefix for 10" (Tera) or larger nor the prefix for 10 (pico) or smaller Please note that the letter 'E' is used to denote 1 where x is whatever number follows E. This notation is used fairly consistently by computers and handheld electronics such as your calculators. On your calculator, to enter the number 5.67 x 10%, the key strokes would be .2EE-6. Upon pressing ENTER, the calculator would show you the number as 5.67E-6. When using Visual Studio C+ as well as other software that performs calculations on numbers where a computer programming language such as C++ is the underlying computational software (as is the case for Microsoft Excel), you can use the letter 'E', typically both uppercase and lowercase, to denote 10. That means that you can use the keyboard to enter large and small numbers using the letter 'E' and you can use this notation in programming statements. Therefore, on the computer, 5.67 x 10 can be typed in as 5.67E-6. # is greater than or Engineering Prefix is # is less than Engineering Prefix: ual to 1,000,000,000 1,000,000 1,000 1,000,000,000 1,000,000 1,000 G (Giga) M (mega) k (kilo) No prefix used Equivalent to: E9 E6 0.001 0.000001 (micro, can use 'u') n (nand E-3 E-6 E-9 0.001 0.000001 Your program must perform the following functions in the order provided: Explain to the user the purpose of the program. Show the user a well-formatted table of the engineering prefixes and their numerical equivalent (same information as is provided in the last two columns of the table above). Ask the user to enter a number (note that it can be floating point). (ang numbe Echo back to the user (which means show the user what they entered) by outputting their number to the screen. There should be no formatting applied to this so the output uses all the 1. 3. 4. L- 3 system's defaults. With the echo, let the user know the output might not look exactly as they input the number due to the system's defaults (see Example and Considerations below). 5. Determine the proper engineering prefix to use. 6. Show the user which engineering prefix should be used 7. Show the user what the number would look like using the correct engineering prefix and always show L3di its(no more, no less) following thedecimal ont. hfHer
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
