Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hello, this is for my intro to programming with C course and we submit our work through in mimir. It would be really helpful if

Hello, this is for my intro to programming with C course and we submit our work through in mimir. It would be really helpful if you define variables when writing the code and have the code easily laid out with an explanation on the bottom. Thank you for your time!

image text in transcribed

This problem will be discussed in Lab6 and the TA will give you hints to solve most of it. However, the TA may not write the complete code. If you have labs on Monday, try to understand the process from the TA so that you can complete it. You will also gain more backgound of writing functions from the main lecture section and that will help you to complete the code in combination of the lab session. Problem: You need to write a code to decide whether or not a desk will fit a room (with its sides parallel to the room) given the dimensions of both. The function sizeCheck() takes in 4 parameters, two for length and width of the room and two for the length and width of the desk. (All lengths should be considered as integers and the parameter list should match with the sequence mentioned above). Based on the parameter, it returns lif the desk fits or returns O if the desk does not fit. In the main function, you should take all the inputs and call the sizeCheck() function. Based on the returned value by the function, print the appropriate message in the main function. If you think a blt, only knowing the area of the room and desk is not enough to make this decision due to thelr shapes. For example, see the following sample Input/Output 3, where the area of the room is bigger than the area of the desk, however, that desk will not fit in the room. Sample Input/Output 1: Enter the length and width of the room: 10 10 Enter the length and width of the desk: 10 10 The desk will fit in the room Sample Input/Output 2: Enter the length and width of the room: 1214 Enter the length and width of the desk: 14 12 The desk will fit in the room. Sample Input/Output 3: Enter the length and width of the room: 2117 Enter the length and width of the desk: 10 22 The desk will not fit in the room. Rubric: 2 points You must have to write the function and use it to get the full credit

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

Step: 3

blur-text-image

Ace Your Homework with AI

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

Get Started

Students also viewed these Databases questions

Question

3. Write a policy statement to address these issues.

Answered: 1 week ago