A program that asks the user if he or she wants to convert values that are lengths or weights.

computer science

Description

A program that asks the user if he or she wants to convert values that are lengths or weights. If the user chooses lengths, the program calls a stub function convert_lengths that simply indicates the user’s choice. If the user chooses weights, the program calls a stub function convert_weights that simply indicates the user’s choice. Use the value 1 to indicate lengths and the value 2 to indicate weights. If the user enters 0, terminate the program. The program should continue to prompt the user for input until he or she correctly enters a value of 0, 1, or 2. In addition, the program should allow the user to call convert_lengths or convert_weights as many times as desired (i.e., until a value of 0 is input, indicating that the user is finished). Notice that this style of loop does not require you to ask the user if they want to continue but instead assumes they want to continue until they select 0.

Instruction Files

Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.