Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c programming 1) Question 2 (5 marks) Small cylinder/cone objects are to be delivered to another location. These cubic objects will be placed inside a

c programming
image text in transcribed
1) Question 2 (5 marks) Small cylinder/cone objects are to be delivered to another location. These cubic objects will be placed inside a rectangular box for ease of management. Assumed the dimension of the cylinder is 3cm for height and 1.5em radius, while the rectangular box (length, width, depth) is 15x18x20 cm. Given is a template (Figure 3) of a C program that determine: 1) the number of cylinder that can be placed inside the rectangular box, ii) the unfilled remaining space in the rectangular box The program should prompt user to enter dimension of cylinder, then dimension of rectangle. The program must display the number of cylinders in the box and the remaining space Complete the Diagram in Figure 3 with the appropriate statements a) Define all variables needed to store the dimension of both shapes (cylinder and rectangular) b) Prompt user to enter dimensions and read data c) Process to calculate the number of cylinders that can be placed in the box d) Process to calculate the remaining space unfilled by the cylinders Display the result // Program to calculate space filling for rectangular box #include int main(void) a) Variables declaration W/ b) Prompt user to enter data Va) 6 d) Process 1/ ) Display the output return 07 Figure 3

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

Recommended Textbook for

XML Data Management Native XML And XML Enabled Database Systems

Authors: Akmal Chaudhri, Awais Rashid, Roberto Zicari, John Fuller

1st Edition

0201844524, 978-0201844528

More Books

Students also viewed these Databases questions

Question

6. Identify characteristics of whiteness.

Answered: 1 week ago

Question

9. Explain the relationship between identity and communication.

Answered: 1 week ago