Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

HOW TO DESIGN THE PROGRAM USING C LANGUAGE 1. Design a user friendly welcome screen based on the requirements in 25, in order to make

HOW TO DESIGN THE PROGRAM USING C LANGUAGEimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

1. Design a user friendly welcome screen based on the requirements in 25, in order to make clear the following aspects: - What does this program accomplish? - What kind of information the user need to input? - What are the requirements for the inputs? (C) Figure 1 Resources of edge lengths for the triangle 2. In function main 0 , prompt the user to input 2 numbers as the 2 edge lengths of a triangle, e.g. 50cm,10 dm, corresponding to Input 1 and Input 2 shown in Figure 1, respectively. The units that are supported by the program include: - Meter, the unit for user input is m - Decimeter, the unit for user input is dm - Centimeter, the unit for user input is cm The inputs should meet the following conditions: - The values should be greater than zero; - The unit for each length should be one of the units supported by the program; - The units for the 2 lengths entered by the user can be different; If any of the conditions above is not satisfied, display one of the error messages below whichever appropriate, and prompt the user to input again until valid inputs are obtained. Error!! The value entered is less than 0 ! or Error!! The unit entered is not supported by the program! 3. Use the first external function to convert the input units into centimeters, then return the lengths in centimeters back to main(). Note: Think about the argument list for the first external function, and global variable is NOT allowed. 4. In function main (, check if both lengths are 10cm, if not, display the following error message and prompt the user to input again until valid inputs are obtained. The lengths in centimeters will be used for all the following calculations. Error!! The length is less than 10cm ! 5. In function main0, if one length is less than 10% of the other length, display the following error message and prompt the user to input again until valid inputs are obtained. For example, if the two inputs are 500cm and 100mm,100mm is less than 50cm(500cm10%=50cm), so the user need to input again. Repeat step 25, until the valid inputs are obtained. Error!! One length is less than 10% of the other

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Intelligent Image Databases Towards Advanced Image Retrieval

Authors: Yihong Gong

1st Edition

1461375037, 978-1461375036

More Books

Students also viewed these Databases questions

Question

What partnerships is your firm currently engaged in?

Answered: 1 week ago

Question

Describe three other types of visual aids.

Answered: 1 week ago