Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

ASSIGNMENT 3: Doing Calculations Name: Station # Programming problem (Exercise #5, Ch 2): The floor of a room is to be covered with tiles, Room

image text in transcribed
ASSIGNMENT 3: Doing Calculations Name: Station # Programming problem (Exercise #5, Ch 2): The floor of a room is to be covered with tiles, Room dimensions (width, length) will be entered in METERS. Tile side values will be entered in centimeters cm square (c.g. 15 cm on each side). There is to be a gap of between each tile entered in MILLIMETERS. All Write a program that, given the room dimensions (in meters), works out the number of whole tiles required. Your program MUST meet the following criteria: 1. All calculations will be made within the program using variables (no calculations performed in a printf() statement... no calculations done in your head or with your calculator). Calculations that are done within the code of your program must include EVERY calculation including even SIMPLE conversions (like cm to m) 3. Use the pow(x,y) command to calculate the area of a tile. The pow(x,y) command requires the math.h library! 4. Print out each value entered. 5. Print out each of the following calculated values: room area, tile + gap area, number of tiles needed (as a whole number... no decimal places). Other program requirements (see rubric on page 2): You MUST have a comment line at the start of your program that contains YOUR NAME and YOUR PROGRAM NAME. You MUST use a printf statement that prints your name on your output. Q1: What types of values (int or float) will you need for the variables used within your program? Q2: What types of calculations require the math.h library in C (besides pow(x,y)? Give two examples: Q3: Write out the code required for your program below (BEFORE entering it into the computer)

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

Progress Monitoring Data Tracking Organizer

Authors: Teacher'S Aid Publications

1st Edition

B0B7QCNRJ1

More Books

Students also viewed these Databases questions

Question

What is IUPAC system? Name organic compounds using IUPAC system.

Answered: 1 week ago

Question

What happens when carbonate and hydrogen react with carbonate?

Answered: 1 week ago