Free Essay

Program That Will Calculate the Number of Square Feet (Living Space) in a 4-Room House.

In: Computers and Technology

Submitted By pickle
Words 294
Pages 2
Program that will calculate the number of square feet (living space) in a 4-room house.
Problem Analysis

In this Program , the aim is to calculate the square feet of a 4 –room house
So we need to know each rooms length and breadth , then calculate each rom’s area and the find the sum of those
Area of Room1=length1*breadth1
Area of Room2=length2*breadth2
Area of Room3=length3*breadth3
Area of Room4=length4*breadth4
Total Number of Square Foots = Area of Room1+ Area of Room2+ Area of Room3+ Area of Room4

Program Design
Pseudocode
Start
Declare the variables i,j as interger length[4], breadth[4],area[4] as double array sum as double
Display “Enter the Rooms length and Breadth”
For i= 1 to 4 do Accept length[i], breadth[i]
Next i
Display “Finding Area and total number of square foots”
Set sum=0
For i= 1 to 4 do Area[i]= length[i]* breadth[i] Sum=sum+Area[i]
Next i
Display “Total number of square foots”, sum
Stop

Program Comments and Test Data
C++ code

#include<iostream>
#include<string>
using namespace std;

int main()
{
int i,j; double length[4], breadth[4] ,area[4], sum;

cout<<"\nEnter the length and breadth of each room"; for (i=0;i<4;i++)
{
cout<<"\nRoom "<<i+1<<" Length :"; cin >>length[i]; cout<<"\nRoom "<<i+1<<" Breadth :"; cin >>breadth[i];
}
sum=0; for (i=0;i<4;i++)
{
area[i]=length[i]* breadth[i]; sum=sum+area[i];
}
cout<<"\nTotal number of square foots :"<<sum<<endl;

return 0;
}

Test data and Output

Similar Documents

Free Essay

Area of Usable Room

...Program that will calculate the number of square feet (living space) in a 4-room house. Problem Analysis In this Program , the aim is to calculate the square feet of a 4 –room house So we need to know each room’s length and breadth, then calculate each room’s area and the find the sum of those Area of Room1=length1*breadth1 Area of Room2=length2*breadth2 Area of Room3=length3*breadth3 Area of Room4=length4*breadth4 Total Number of Square Foots = Area of Room1+ Area of Room2+ Area of Room3+ Area of Room4 Program Design Pseudocode Start Declare the variables i,j as interger length[4], breadth[4],area[4] as double array sum as double Display “Enter the Rooms length and Breadth” For i= 1 to 4 do Accept length[i], breadth[i] Next i Display “Finding Area and total number of square foots” Set sum=0 For i= 1 to 4 do Area[i]= length[i]* breadth[i] Sum=sum+Area[i] Next i Display “Total number of square foots”, sum Stop Program Comments and Test Data Test data and Output Example application test data: Input: Room length and width (in feet) Expected output: Total square footage of house (in square feet) Room1: length=10, width=14; Room 2: length=9, width=10; Room 3: length=12, width=12; Room 4: length=11, width=9 473 Room1: length=20, width=10; Room 2: length=15, width=10; Room 3: length=20, width=10; Room 4: length=30, width=10 850 Room1: length=20, width=15; Room 2: length=10, width=5; Room 3: length=30...

Words: 276 - Pages: 2

Free Essay

Calculate Square Footage

...04/01/2012 Problem definition: Calculate the usable area in square feet of house. Assume that the house has a maximum of four rooms, and that each room is rectangular. A. Problem Analysis – Following the directions in the assignment, clearly write up your problem analysis in this section. In this program the overall goal is to obtain the usable area in square feet in a house. The results or overall goal would be considered the required output. To obtain the required output we would need the necessary input. The necessary information regarding the house is that it contains a maximum of four rooms that are rectangular in shape. I will obtain the required output from the given input by multiplying length x width to find the number of square feet in each rectangular room. Once the combined square footage of each room is determined this will give me the amount of usable living space. We would need to know each room length and width, then calculate each rooms area and then find the sum of all four rooms. Area of Room 1= Length1 x Width1 Area of Room 2= Length2 x Width2 Area of Room 3= Length3 x Width3 Area of Room 4= Length4 x Width4 Area of Room 1 + Room 2 + Room 3 =Room 4 = Total Square footage B. Program Design – Following the directions in the assignment, clearly write up your problem design in this section and comment your pseudocode. Useable square footage of a house Rooms- Total number of Rooms = 4 Area-Area=L x W of each room Variables= Length, width...

Words: 643 - Pages: 3

Premium Essay

Homework1

...CMIS102 Homework Assignment 1 (Worth 13% of your grade) Problem definition: Calculate the usable area in square feet of house. Assume that the house has a maximum of four rooms, and that each room is rectangular. A. Problem Analysis – Following the directions in the assignment, clearly write up your problem analysis in this section. In order to determine the usable area of the house I must first find out what is the total square feet area of each of the four rooms. I know that to get the area of each room I have to multiply LengthFeet X WidthFeet and that will give me the area of a 1 Room. Then I must do this to all four rooms, therefore, the results of the total area of the four rooms will give me the usable area of the house. My output variables are: UsableAreaFeet (float variable), AreaOfRoomFeet (float variable). Input variables: Length (float variable) and Width (float variable) and AreaOfRoomFeet (float variable). Formulas need it: AreaOfRoomX=Length X Width Where X is rooms 1-4, UsableAreaFeet=AreaOfRoom1Feet + AreaOfRoom2Feet + AreaOfRoom3Feet + AreaOfRoom4Feet B. Program Design – Following the directions in the assignment, clearly write up your problem design in this section and comment your pseudocode. PseudoCode Input Data Module: Input: LengthFeet, WidthFeet, AreaOfRoomXFeet Perform Calculations Module Compute: AreaOfRoomXFeet Here the formula use will be AreaOfRoomX = Length X Width Compute: UsableAreaFeet Here I will use...

Words: 560 - Pages: 3

Free Essay

Linneman Re Letter

...Volume 10, Issue 3 Fall 2010 No Double Dip On July 5th, 6th, and very early on the 7th of this year, I engaged in 70 minutes of rigorous stationary biking, a full cycle of weightlifting, and my daily stretching regimen. Oh sure, I had some hip pain and a sore knee, but at age 59, I was rocking and rolling. In this regard, I was not unlike the U.S. economy in 2005-April 2007, which was doing great in spite of some fundamental problems. Then in the course of a few hours on July 7th, I was unable to walk more than a few steps after having a hip replaced. Just like the U.S. economy in late 2008, my infirmity had taken me down a few notches! My subsequent recovery was remarkably similar to that facing the U.S. economy: a satisfactory recovery to unremarkable mediocrity. As I describe my recovery, bear in mind that the U.S. economy shed 8.4 million jobs and 4.1% of GDP in roughly 18 months. This is a lot of economic damage. On July 8th, I was able to walk twice a day for 20 minutes, bearing weight on crutches, lifting light hand weights, and doing simple leg therapy. By July 19th, I did not need any pills or a cane, and was able to walk an hour twice a day at a 23-minute-mile pace. By August 19th, I biked at full resistance for 50 minutes, walked 15-minute-miles for an hour, actively lifted leg weights, Thru Latest Available as of Sept 20, 2010 3.0 $420.5 20.5 1.9 960.1 $418 15.8 6.3 1,458.0 723.0 -50.0 261.0 681.0 15.8 4.5 20.0 93.9 -2.3 2.4 -190.2 $305.1 -$351.9 On the...

Words: 53759 - Pages: 216

Premium Essay

Hhello

...STARTING OUT WITH Python ® Second Edition This page intentionally left blank STARTING OUT WITH Python ® Second Edition Tony Gaddis Haywood Community College Addison-Wesley Boston Columbus Indianapolis New York San Francisco Upper Saddle River Amsterdam Cape Town Dubai London Madrid Milan Munich Paris Montreal Toronto Delhi Mexico City São Paulo Sydney Hong Kong Seoul Singapore Taipei Tokyo Vice President and Editorial Director, ECS: Editor-in-Chief: Editorial Assistant: Vice President, Marketing: Marketing Manager: Marketing Coordinator: Vice President, Production: Managing Editor: Production Project Manager: Manufacturing Buyer: Art Director: Cover Designer: Cover Image: Media Editor: Project Management: Composition and Illustration: Printer/Binder: Cover Printer: Marcia Horton Michael Hirsch Stephanie Sellinger Patrice Jones Yezan Alayan Kathryn Ferranti Vince O’Brien Jeff Holcomb Kayla Smith-Tarbox Lisa McDowell Linda Knowles Joyce Cosentino Wells/JWells Design © Digital Vision Dan Sandin/Wanda Rockwell Sherill Redd, Aptara®, Inc. Aptara®, Inc. Edwards Brothers LeHigh-Phoenix Color/Hagerstown Credits and acknowledgments borrowed from other sources and reproduced, with permission, appear on the Credits page in the endmatter of this textbook. Copyright © 2012, 2009 Pearson Education, Inc., publishing as Addison-Wesley. All rights reserved. Manufactured in the United States of America. This publication...

Words: 76897 - Pages: 308

Premium Essay

Hjghhh

...Real Estate Finance F-409 Submitted To Farzana Lalarukh Associate Professor Department of Finance University of Dhaka Submitted By No Name Roll 1. Masud Ahmed 16-014 2. Khaleda Aziz 16-024 3. Akhter-E-Tamanna 16-102 4. Sameya Azad 16-152 5. Mohammad Mominuzzaman Bhuiyan 16-174 Date of Submission: 17-2-14 Date: 17-2-14 Farzana Lalarukh Associate Professor Department of finance University of Dhaka Subject: Submission report on “ Long Run Perspectives of Developer in Bangladesh” Dear Madam, We are pleased to submit the report you have assigned to us. The report paper was to prepare the term paper on the course named “Real Estate Finance” course code: F-409, as a part of our academic activities. Working on this report was a great opportunity for us to apply our theoretical expertise, sharpen our view and ideas. Finally, we are very thankful to you for giving us an effective topic to prepare our report and we are waiting eagerly for any kind of question you may have concerning our report. Sincerely yours On Behalf of our Group ………………………. Sameya Azad This is high time we conveyed our deepest gratitude and sincere submission to the Almighty ALLAH for giving us the opportunity to accomplish such an enjoyable task of preparing this report in time. We express our thanks to our dear course teacher Mrs. Farzana Lalarukh for assigning us a report dealing with the Real estate sector and...

Words: 7200 - Pages: 29

Free Essay

Student

...insider guide ACE YOUR CASE® III: MARKET-SIZING QUESTIONS 2nd edition ★ 15 PRACTICE CASE QUESTIONS ★ MARKET-SIZING CASE RULES ★ WETFEET’S EXPERT COMMENTARY >> The WetFeet Methodology You hold in your hands a copy of the highest-quality research available for job seekers. We’ve designed the WetFeet Insider Guides to help cut down on the time you spend doing job research by doing some of the work for you. Hopefully we can make your job search as painless as possible. Each WetFeet Insider Guide is the product of hundreds of hours of in-depth research, critical analysis, and precise writing. We survey massive amounts of publicly available information and conduct dozens of in-depth interviews of rank-and-file employees who work for the companies and industries we cover. (We keep our company contacts anonymous to encourage candor.) WetFeet writers—experts at reading between the lines—speak with company recruiting staff members to make sure you get accurate information about the recruiting process, compensation, and hiring targets. We also consult countless experts, from career coaches and networking gurus to authorities on professional etiquette and personal branding, in order to provide you insight on the latest trends affecting job seekers. Each Insider Guide undergoes extensive editorial review and fact-checking to ensure that the information and writing live up to our exacting standards. And because WetFeet retains all editorial control of our Insider...

Words: 25729 - Pages: 103

Free Essay

Dan Brown

...appreciation. To live in the world without becoming aware of the meaning of the world is like wandering about in a great library without touching the books. The Secret Teachings of All Ages ———————————— FACT: In 1991, a document was locked in the safe of the director of the CIA. The document is still there today. Its cryptic text includes references to an ancient portal and an unknown location underground. The document also contains the phrase “It’s buried out there somewhere.” All organizations in this novel exist, including the Freemasons, the Invisible College, the Office of Security, the SMSC, and the Institute of Noetic Sciences. All rituals, science, artwork, and monuments in this novel are real. ———————————— Prologue House of the Temple 8:33 P.M. The secret is how to die. Since the beginning of time, the secret had always been how to die. The thirty-four-year-old initiate gazed down at the human skull cradled in his palms. The skull was hollow, like a bowl, filled with bloodred wine. Drink it, he told himself. You have nothing to fear. As was tradition, he had begun this journey adorned in the ritualistic garb of a medieval heretic being led to the gallows, his loose-fitting shirt gaping open to reveal his pale chest, his left pant leg rolled up to the knee, and his right sleeve rolled up to the elbow. Around his neck hung a heavy rope...

Words: 164451 - Pages: 658

Free Essay

Spa & Wellness Industry

...Elsevier http://www.nckvietnam.com Butterworth-Heinemann is an imprint of Elsevier Linacre House, Jordan Hill, Oxford OX2 8DP, UK 30 Corporate Drive, Suite 400, Burlington, MA01803, USA First edition 2008 Copyright © 2008 Elsevier Ltd. All rights reserved No part of this publication may be reproduced, stored in a retrieval system or transmitted in any form or by any means electronic, mechanical, photocopying, recording or otherwise without the prior written permission of the publisher Permissions may be sought directly from Elsevier’s Science & Technology Rights Department in Oxford, UK: phone ( 44) (0) 1865 843830; fax ( 44) (0) 1865 853333; email: permissions@elsevier.com. Alternatively you can submit your request online by visiting the Elsevier web site at http:/ /elsevier.com/locate/permissions, and selecting Obtaining permission to use Elsevier material Notice No responsibility is assumed by the publisher for any injury and/or damage to persons or property as a matter of products liability, negligence or otherwise, or from any use or operation of any methods, products, instructions or ideas contained in the material herein. British Library Cataloguing in Publication Data A catalogue record for this book is available from the British Library Library of Congress Cataloging-in-Publication Data A catalog record for this book is available from the Library of Congress ISBN: 978-0-7506-8464-4 For information on all Butterworth-Heinemann...

Words: 153860 - Pages: 616

Premium Essay

Sound Acounting

...to be covered with multi-colored wall-papers and other pictures, decorative stuffs along with an outstanding lighting arrangement so that it gets a real kiddy look. This shop will open at 10:00am and close at 8:00pm. The time has been selected concerning the school hours and time for studies for the kids. The second shift (3:00pm – 8:00pm) turns out to be the pick hour. There will be a day off on Tuesday at Kids’ Planet. The services provided by Kids’ Planet:  A Well-furnished Library: In the more traditional sense, a library is a collection of books. It can mean the building or room that houses such a collection, literally a collection of useful material for common use. Libraries most often provide a place of silence for studying. Same thing goes for Kids’ Planet. The library will be well furnished with pretty and colorful furniture like book-shelves, small chairs for kids, big square tables, round tables, low tables for keeping books in different manners and so on. This library will begin its journey with approximately 5000 books of various kinds like: story books, comics, rhymes, science fiction, autobiography, history, geography, religion and many more – all eligible for kids under 17. There will be comfortable seating arrangements for kids who like to seat and read in silence. Few seats will be arranged in the silent cozy corners and...

Words: 4783 - Pages: 20

Free Essay

Archicad Step by Step

...ArchiCAD Step by Step Tutorial Contents Contents About the Author Thomas M. Simmons President ARCHVISTA The Graphisoft ArchiCAD Step by Step Tutorial was developed by ARCHVISTA and used with the ArchiCAD training course at the San Francisco Institute of Architects. This is the first edition of Step by Step produced for ArchiCAD 8. The author, Thomas M. Simmons, spent seven years as an architect and served as the Director of Design Technology for Esherick, Homsey, Dodge and Davis Architects, an award-winning and internationally acclaimed architecture firm, before starting his company, ARCHVISTA. While at EHDD Architects, he was instrumental in integrating and managing ArchiCAD on a variety of projects including single-family houses, commercial buildings, libraries and aquariums. Simmons received a Master of Architecture degree from the University of California, Berkeley, and a Bachelor of Environmental Design degree from Texas A & M University. He has been a speaker on a variety of subjects including Beginning to Advanced ArchiCAD, Architectural Multimedia,...

Words: 31008 - Pages: 125

Free Essay

Gmat

...distributed in any form or by any means, or stored in a database or retrieval system, without the prior written permission of the publisher. 0-07-151120-2 The material in this eBook also appears in the print version of this title: 0-07-149340-9. All trademarks are trademarks of their respective owners. Rather than put a trademark symbol after every occurrence of a trademarked name, we use names in an editorial fashion only, and to the benefit of the trademark owner, with no intention of infringement of the trademark. Where such designations appear in this book, they have been printed with initial caps. McGraw-Hill eBooks are available at special quantity discounts to use as premiums and sales promotions, or for use in corporate training programs. For more information, please contact George Hoare, Special Sales, at george_hoare@mcgraw-hill.com or (212) 904-4069. TERMS OF USE This is a copyrighted work and The McGraw-Hill Companies, Inc. (“McGraw-Hill”) and its licensors reserve all rights in and to the work. Use of this work is subject to these terms. Except as permitted under the Copyright Act of 1976 and the right to store and retrieve one copy of the work, you may not decompile, disassemble, reverse engineer, reproduce, modify, create derivative works based upon, transmit, distribute, disseminate, sell, publish or sublicense the work or any part of it without McGraw-Hill’s...

Words: 234594 - Pages: 939

Premium Essay

Real Estate

...actions of local, state, and federal governments affect real estate values d. All of the above 4. Approximately what portion of U.S. households own their own home? b. Approximately two-thirds 5. Of the following asset categories, which class has the greatest aggregate market value? d. Nongovernment real estate 6. Storm water drainage systems are best described as: b. Improvements to the land 7. What is the single largest asset category, in terms of value, in the portfolio of the typical U.S. household? a. Housing 8. Real estate markets differ from other asset classes by having all of the following characteristics except: d. Homogeneous product 9. Which of the following is not important to the location of commercial properties? c. Access to schools 10. Which of the following attributes of a home are the most difficult to observe and value? c. location attributes ------------------------------------------------- Study Questions 1. The term real estate can be used in three fundamental ways. List these three alternative uses or definitions. Solution: Real estate is most commonly defined as land and any improvements made to or on the land, including fixed structures and infrastructure components. The term is also used to describe the “bundle of rights” associated with the ownership and use of the physical characteristics of space and location. Finally, real estate may be described as the...

Words: 13860 - Pages: 56

Free Essay

Implementation of Commercial Energy Saving Controls in the Home Environment.

...Implementation of commercial energy saving controls in the home environment. Prepared for: Christopher McCulloch MSTM 4060 Instructor Memorial University of Newfoundland Prepared by: Ray Bursey Student number: 200207546 Due: July 24, 2011 Prepared in partial fulfillment of the requirements of MSTM 4060: Advanced Technical Communications 31 Concord Rd Conception Bay South, NL, A1X 2C1 July 24, 2011 Mr. Christopher McCulloch Instructor, Advanced Technical Communications Marine Institute of Memorial University of Newfoundland PO BOX ??? St. John's, NL, A1C5R3 Dear Mr. McCulloch, In response to your request during April 2011, I have prepared the following report entitled Implementation of Commercial Energy Saving Controls in the Home Environment. As the title of the report suggests, energy saving controls commonly used in the commercial sector are possible and can prove very beneficial. Home automation is a growing field in which research is being conducted at an increasing rate. This report concerning the home automation field makes reference to industry specific and moderately technical terms; therefore to assist with information presented, a glossary has been included in Appendix A. I have enjoyed working on this report and look forward to presenting the findings in the upcoming PowerPoint presentation portion of the course the week of July 25th, 2011. In the meantime, should there be any questions about the report you can contact me...

Words: 5721 - Pages: 23

Free Essay

Aicirteam

...Athletic HISTORY The first modern-style indoor athletics meetings were recorded shortly after in the 1860s, including a meet at Ashburnham Hall in London which featured four running events and a triple jump competition. The Amateur Athletic Association (AAA) was established in England in 1880 as the first national body for the sport of athletics and began holding its own annual athletics competition – the AAA Championships. The United States also began holding an annual national competition – the USA Outdoor Track and Field Championships – first held in 1876 by the New York Athletic Club.[14] Athletics became codified and standardized via the English AAA and other general sports organisations in the late 19th century, such as the Amateur Athletic Union (founded in the US in 1888) and the Union des sociétésfrançaises de sports athlétiques (founded in France in 1889). An athletics competition was included in the first modern Olympic Games in 1896 and it has been as one of the foremost competitions at the quadrennial multi-sport event ever since. Originally for men only, the 1928 Olympics saw the introduction of women's events in the athletics programme. Athletics is part of the Paralympic Games since the inaugural Games in 1960. Athletics has a very high profile during major championships, especially the Olympics, but otherwise is less popular. An international governing body, the International Amateur Athletics Federation (IAAF), was founded in 1912; it adopted its current...

Words: 43282 - Pages: 174