Premium Essay

Programming Logic and Design 6th Ed

In:

Submitted By equ2me2
Words 1493
Pages 6
Programming Logic and Design, 6th Edition

Chapter 5

Exercises

1. What is output by each of the pseudocode segments in Figure 5-22?

Answer:
a. 5, 22, 5
b. 4, 6, 7
c. 5, 6
d. Goodbye
Goodbye
Goodbye
Goodbye
Goodbye
Goodbye
Goodbye
Goodbye
Goodbye
e. Hello
Hello
Hello
f. Adios
Adios
Adios
Adios
Adios
Adios
Adios
Adios

2. Design the logic for a program that outputs every number from 1 through 10.

Answer:
A sample solution follows

Flowchart:

Pseudocode:

start Declarations num number housekeeping() number = 1 while number 99999 output “Please enter a valid zip code” input custZip endwhile return

validateCustAge() while custAge < 10 OR custAge > 110 output “Please enter a valid customer age” input custAge endwhile return

validateNumItems() Declarations num attempts = 0 num LIMIT = 2 validNumItems = 1 while (numItems < 1 OR numItems > 12) AND attempts < LIMIT output “Please reenter the number of items” input numItems attempts = attempts + 1 endwhile if attempts = 2 AND numItems < 0 then output “An invalid number of items was entered” output “This order will not be counted” validNumItems = 0 endif return

housekeeping() output ZIP_PROMPT input custZip return detailLoop() output AGE_PROMPT input custAge output ITEM_PROMPT input numItems

validateZipCode() validateCustAge() validateNumItems()

countOfOrders = countOfOrders + 1 totalCustAge = totalCustAge + custAge

if custZip = STORE_ZIP numItemsInStoreZip = numItemsInStoreZip + numItems else numItemsInOtherZips = numItemsInOtherZips + numItems endif

if custAge < 30 then numItemsUnder30 = numItemsUnder30 + numItems else numItems30AndOlder = numItems30AndOlder + numItems endif output ZIP_PROMPT

Similar Documents

Premium Essay

Bull

...Department of Information Technology ENDT200: Introduction to Programming Credit Hours: 3 Length of Course: 8 Weeks Prerequisite(s): None | Table of Contents | Instructor Information | Evaluation Procedures | Course Description | Grading Scale | Course Scope | Course Outline | Course Objectives | Policies | Course Delivery Method | Academic Services | Course Resources | Selected Bibliography | Instructor Information | Instructor: Jason T. Black, PhD (also called “Dr. B”) Email: Use the Messages feature in the classroom to email me. Table of Contents Course Description (Catalog) | This course introduces students to writing computer programs. The class presents the principles of structured programming using the BASIC language, perhaps the most common language for personal computers. Because of its ease of use it is ideal as a first programming language and runs on both the PC and Macintosh platforms. The course is designed for people without previous programming experience who do not necessarily plan on becoming professional programmers. However, the knowledge gained in the class can be applied later to other languages such as C and Java. Participants learn to solve problems logically by breaking them into smaller pieces, which can then be solved. Topics include: introduction to computing - how does a computer work?; input and output - getting information to and from the user; variables and expressions - performing arithmetic; data...

Words: 2708 - Pages: 11

Free Essay

Dr Manger

...Organizational Theory, Design, and Change Jones 6th Edition Test Bank Click here to download the solutions manual / test bank INSTANTLY!!! http://solutionsmanualtestbanks.blogspot.com/2011/10/organizational-theory-d esign-and-change_18.html ----------------------------------------------------------------------Organizational Organizational Organizational Organizational Theory, Theory, Theory, Theory, Design, Design, Design, Design, and and and and Change Change Change Change Jones Jones Jones Jones 6th 6th 6th 6th Edition Edition Edition Edition Test Test Test Test Bank Bank Bank Bank -------------------------------------------------------------------------***THIS IS NOT THE ACTUAL BOOK. YOU ARE BUYING the Test Bank in e-version of the following book*** Name: Organizational Theory, Design, and Change Author: Jones Edition: 6th ISBN-10: 0136087310 Type: Test Bank - The test bank is what most professors use an a reference when making exams for their students, which means there’s a very high chance that you will see a very similar, if not exact the exact, question in the test! - The file is either in .doc, .pdf, excel, or zipped in the package and can easily be read on PCs and Macs. - Delivery is INSTANT. You can download the files IMMEDIATELY once payment is done. If you have any questions, please feel free to contact us. Our response is the fastest. All questions will always be answered in 6 hours. This is the quality of service we are providing and we hope to be your...

Words: 29834 - Pages: 120

Free Essay

Accounting

...Click here to download the solutions manual / test bank INSTANTLY!! http://testbanksolutionsmanual.blogspot.com/2011/02/accounting-information-systems-romney.html ------------------------------------------------------------------------------------------------------------------------ Accounting Information Systems Romney 11th Edition Solutions Manual Accounting Information Systems Romney 11th Edition Solutions Manual Accounting Information Systems Romney 11th Edition Solutions Manual Accounting Information Systems Romney Steinbart 11th Edition Solutions Manual Accounting Information Systems Romney Steinbart 11th Edition Solutions Manual ------------------------------------------------------------------------------------------------------------------------ ***THIS IS NOT THE ACTUAL BOOK. YOU ARE BUYING the Solution Manual in e-version of the following book*** Name: Accounting Information Systems Author: Romney Steinbart Edition: 11th ISBN-10: 0136015182 Type: Solutions Manual - The file contains solutions and questions to all chapters and all questions. All the files are carefully checked and accuracy is ensured. - The file is either in .doc, .pdf, excel, or zipped in the package and can easily be read on PCs and Macs.  - Delivery is INSTANT. You can download the files IMMEDIATELY once payment is done. If you have any questions, please feel free to contact us. Our response is the fastest. All questions will always be answered in 6...

Words: 18533 - Pages: 75

Free Essay

Innovation and Erp Systems

...PROGRAMME) PROGRAMME EDUCATIONAL OBJECTIVES: I. Graduates will work as software professional in industry of repute. II. Graduates will pursue higher studies and research in engineering and management disciplines. III. Graduates will work as entrepreneurs by establishing startups to take up projects for societal and environmental cause. PROGRAMME OUTCOMES: A. Ability to effectively apply knowledge of computing, applied sciences and mathematics to computer science & engineering problems. B. Identify, formulate, research literature, and analyze complex computer science & engineering problems reaching substantiated conclusions using first principles of mathematics, natural sciences, and engineering sciences. C. Design solutions for computer science & engineering problems and design system components or processes that meet the specified needs with appropriate consideration for the public health and safety, and the cultural, societal, and environmental considerations. D. Conduct investigations of complex problems...

Words: 23989 - Pages: 96

Premium Essay

Syllabus

...Title Scheme of Teaching L 3 0 3 0 3 0 T 1 0 1 0 1 0 P 0 3 0 3 0 3 Hours 4 3 4 3 4 3 Credit 4 2 4 2 4 2 University External Marks 50 50 50 CSE361 CSE313 CSE363 AS301 EC316 EC366 EC317 EC367 Data Structures (Practical) Peripheral Devices & Interfaces Hardware Lab (Practical) Engineering Mathematics – III Digital Electronics Digital Electronics (Practical) Microprocessors Microprocessors (Practical) 0 3 0 3 3 0 3 0 15 0 1 0 1 1 0 1 0 5 3 0 2 0 0 2 0 2 09 3 4 2 4 4 2 4 2 29 2 4 1 4 4 1 4 1 25 50 50 50 50 250 Internal Total Sessional Marks 50 50 50 50 50 50 50 50 50 450 100 50 100 50 100 100 50 100 50 700 7. 8. Total ASC405 CSE 415 Analysis & Design of Algorithms Analysis & Design of Algorithms (Practical) Database Management System Database Management System (Practical) Object Oriented Programming Object Oriented Programming (Practical) Cyber Law & IPR Computer Architecture & Organization Internal Total Sessional Marks 50 100 50 50 50 50 50 50 100 50 100 50 3 3 15 0 1 4 0 0 9 3 4 28 3 4 25 50 50 250 50 50 400 100 100 650 2 Scheme of Examination of B.E. in Computer Science & Engineering Third Year - Fifth Semester Sr. Paper Subject Title Scheme of Teaching Univesity Internal Sessional Code External L T P Hou Credit Marks Total Marks rs s 1. CSE511 Operating System 3 1 0 4 4 50 50...

Words: 14784 - Pages: 60

Premium Essay

Doc, Docx Pdf

...Blackboard course shell under the Student Center. Below is a list of courses with eChapters loaded into the course shells, giving students free access as of the first day of classes. * = eChapters are forthcoming Course ID ACC100 ACC206 ACC303 ACC304 ACC305 ACC306 Text Title Accounting Principles – 9th edition Accounting Principles – 9th edition Intermediate Accounting 14e Intermediate Accounting 14e Intermediate Accounting 14e Microcomputer Applications for Accounting Excel 2010 Microsoft® Excel 2010: A Case Approach, Complete, 1st Edition, copyright 2011 SOUTH WESTERN FEDERAL TAXATION 2012: COMPREHENSIVE, 36th ed. South-Western Federal Taxation 2013: Corporations, Partnerships, Estates and Trusts, 36th Edition Cost Accounting 13th 09 ed. Advanced Accounting 4th 10th ed. Auditing & Assurance Services 13th 10 ed. Core Concepts of Government and Not for Profit Accounting 2nd ed., 2011 ed ACC 499: Accounting Capstone: Custom Edition Author Weygandt, Kimmel & Kieso Weygandt, Kimmel & Kieso Kieso Kieso Kieso O’Leary Publisher Wiley Wiley Wiley Wiley Wiley McGraw Hill ACC307 ACC317 ACC350 ACC401 ACC403 ACC410 ACC499 Hoffman Hoffman Horngren Jeter Arens Granof Selected chapters from accounting texts Pope Weygandt Weygandt Knapp & Rittenburg Schroeder Romney Pope Cengage...

Words: 3676 - Pages: 15

Free Essay

Swort Analysis

...Copy and Paste the link below to download IMMEDIATELY!!! http://solutionsmanualtestbanks.blogspot.com/2011/10/accounting-principles-weygandt-9th.html Accounting Principles Weygandt Kieso Kimmel 9th Edition Solutions Manual -------------------------------------------------------------------------- Name: Accounting Principles Author: Weygandt Kieso Kimmel Edition: 9th ISBN-10: 047031754X Type: Solutions Manual - The file contains solutions and questions to all chapters and all questions. All the files are carefully checked and accuracy is ensured. - The file is either in .doc, .pdf, excel, or zipped in the package and can easily be read on PCs and Macs.  - Delivery is INSTANT. You can download the files IMMEDIATELY once payment is done. If you have any questions, please feel free to contact us. Our response is the fastest. All questions will always be answered in 6 hours.  This is the quality of service we are providing and we hope to be your helper.  Delivery is in the next moment. Solution Manual is accurate. Buy now below and the DOWNLOAD LINK WILL APPEAR IMMEDIATELY once payment is done!  Prepare to receive your Accounting Principles Solution Manual in the next moment. -------------------------------------- Accounting Principles Solution Manual Here’s a sample list of all other solutions manuals we have, if you need any one of them please contact us at solutionsmanualzone@gmail.com -A Transition to Advanced Mathematics by Douglas Smith,...

Words: 9465 - Pages: 38

Free Essay

Idrivesa

... |P/D |C | | |English |2+1 |- |4 | | |Mathematics - I |3+1 |- |6 | | |Mathematical Methods |3+1 |- |6 | | |Applied Physics |2+1 |- |4 | | |C Programming and Data Structures |3+1 |- |6 | | |Network Analysis |2+1 |- |4 | | |Electronic Devices and Circuits |3+1 |- |6 | | |Engineering Drawing |- |3 |4 | | |Computer Programming Lab. |- |3 |4 | | |IT Workshop |- |3 |4 | | |Electronic Devices and Circuits Lab |- |3 |4 | | |English Language Communication Skills Lab. |- |3 |4 | | |Total |25 ...

Words: 26947 - Pages: 108

Free Essay

Service Request

...Service Request SR-rm-022, Part 3 BSA/375 Service Request SR-rm-022, Part 3 Riordan Manufacturing is a global plastic manufacturer located in Albany, Georgia. Founded by Dr. Riordan, a professor of chemistry, he wanted to use existing patents to create a better plastic. He later bought a fan manufacturing company and became Riordan Manufacturing. Today Riordan Manufacturing is projected to earn $46 million annually and employs over 550 employees. With Riordan Manufacturing expanding the company needs to expand their Human Resources program to better the effectiveness of work within the department. Interested Stockholders The CEO and President Michael Riordan is the main stockholder because he is who signs everyone’s checks. The Director of Human Resources would be beneficial to gather information from because he/she is the one running the department and knows the applications they are using now. Chief Operating Officer, Executive Assistant, and the Senior Vice President are stockholders we should gather information from as well. The Chief Operating Officer knows what every department is using to accomplish their work and can give feedback on certain applications being used. The Executive Assistant is good to gather information from as well because they know more than others about what is happening around the manufacturing plant. A couple floor employees working in the Human Resources Department would be useful as well because they use the programs on a daily basis and...

Words: 2189 - Pages: 9

Premium Essay

Auditing 2.3

...Cultura, Brief Edition, 6/E Eduardo Zayas-Bazán, Solutions Manual And Test Bank 2012 Individual Taxation 6e James W. Pratt, William N. Kulsrud Solutions manaual and test bank A Concise Introduction To Logic 11e Patrick Hurley solutions manual and test bank A friendly introduction to number theory 3rd by silverman( solutions manual) A History of Modern Psychology, 10th Duane P. Schultz, Sydney Ellen Schultz instructor manual with test bank Abnormal psychology - thomas f. Oltmanns (5th ed) solutions manual and test bank Abnormal psychology 14e butcher mineka hooley solutions manual and tet bank About Philosophy, 11/E Robert Paul Wolff,  instructor manual with test bank Absolute C ++ 4e Walter Savitch Solutions manaual and test bank Absolute C++ 5/E Walter Savitch solutions manual and test bank Accounting 24e Carl Warren James M. Reeve Solutions manaual and test bank Accounting 9e Horngren Harrison Oliver Solutions manaual and test bank Accounting concepts and applications - steve albrecht (11th ed) solutions manual and test bank Accounting for governmental and nonprofit entities 16e by wilson & reck solutions manual and test bank Accounting Information System 9e Bonder Solutions manaual and test bank Accounting information systems - george h. Bodnar (10th ed) solutions manual and test bank Accounting information systems 12e marshall b. Romney paul j. Steinbart solutions manual and test bank Accounting Information Systems 2e Robert Hurt Solutions manaual...

Words: 4815 - Pages: 20

Premium Essay

Riordan Manufactoring Hr System

...Riordan Manufacturing HR System January 3, 2012 Riordan Manufacturing is a company that produces plastic items. It has several locations and every location serves a different purpose. The corporate location is located in San Jose which is also where research and development is done. Currently Riordan’s HR department has a variety of HR tools which need to be integrated into one application. This project will be done using the SDLC for success. Stakeholder Requirements The requirements for the integrated HR system will come from various people. The head stake holder would be COO Hugh McCauley. He is the requester of the service and has final say to go ahead with the project. Since Riordan has multiple locations with multiple HR offices it is important to keep in mind the users in all offices. For requirements it would be best to consult the director of HR and users under her. Yvonne McMillan is the director of human resources and is the person of interest for user requirements. The analysis team will need to speak with users under Yvonne such as the Employee Relations Manager, Compensation & Benefits Manager, Payroll Manager, Employee Relations Specialist, Compensation Analyst, Benefits Manager, Payroll/Tax Clerk, Recruiters, Training and Development team, Safety Manager and Safety Techs. These users are vital to understand how the HR system works for them day to day. Requirements from this list of users can be used to determine how the new integrated system will...

Words: 3672 - Pages: 15

Premium Essay

Asas

... ¼ Yellow Paper, to be submitted next meeting. LO-01: Distinguished the difference between Computer Architecture and Computer Organization, and discussed the different types of architecture. 1) 2) Computer Organization and Architecture Instructor: John Vee MI P. Martinez Computer Architecture vs. Computer Organization Types of Architecture Computer Organization and Architecture Instructor: John Vee MI P. Martinez LO 1.1 – Computer Architecture vs. Computer Organization LO 1.1 – Computer Architecture vs. Computer Organization COMPUTER ARCHITECTURE: COMPUTER ARCHITECTURE:  Baer: “The design of the integrated system which provides a useful tool to the programmer”  Foster: “The art of designing a machine that will be a pleasure to work with”  Hayes: “The study of the structure, behavior and design of computers”  Hennessy and Patterson: “The interface between the hardware and the lowest level software”  Abd-Alla: “The...

Words: 4567 - Pages: 19

Free Essay

Nit-Silchar B.Tech Syllabus

...Laboratory Workshop Physical Training-I NCC/NSO/NSS L 3 3 3 1 3 0 0 0 0 13 T 1 0 1 0 0 0 0 0 0 2 1 1 1 1 0 0 0 0 4 1 1 0 0 0 0 0 0 2 0 0 0 0 P 0 0 0 3 0 2 3 2 2 8 0 0 0 0 0 2 2 2 2 0 0 0 0 0 2 2 2 6 0 0 8 2 C 8 6 8 5 6 2 3 0 0 38 8 8 8 8 6 2 0 0 40 8 8 6 6 6 2 2 2 40 6 6 8 2 Course No EC-1101 CS-1101 MA-1102 ME-1101 PH-1101/ CH-1101 CS-1111 EE-1111 PH-1111/ CH-1111 Course Name Semester-2 Basic Electronics Introduction to Computing Mathematics-II Engineering Mechanics Physics/Chemistry Computing Laboratory Electrical Science Laboratory Physics/Chemistry Laboratory Physical Training –II NCC/NSO/NSS Semester-4 Structural Analysis-I Hydraulics Environmental Engg-I Structural Design-I Managerial Economics Engg. Geology Laboratory Hydraulics Laboratory Physical Training-IV NCC/NSO/NSS Semester-6 Structural Design-II Structural Analysis-III Foundation Engineering Transportation Engineering-II Hydrology &Flood Control Concrete Lab Structural Engineering Lab L 3 3 3 3 3 0 0 0 0 0 15 3 3 3 3 3 0 0 0 0 15 3 3 3 3 3 0 0 T 0 0 1 1 1 0 0 0 0 0 3 1 1 0 1 0 0 0 0 0 3 1 1 1 0 0 0 0 P 0 0 0 0 0 2 2 2 2 2 6 0 0 0 0 0 2 2 2 2 4 0 0 0 0 0 2 2 C 6 6 8 8 8 2 2 2 0 0 42 8 8 6 8 6 2 2 0 0 40 8 8 8 6 6 2 2 MA-1201 CE- 1201 CE -1202 CE -1203 CE-1204 CE-1211 Semester-3 Mathematics-III Building Materials and...

Words: 126345 - Pages: 506

Premium Essay

Proposed Frequent Shopper Rewards Program

...Kudler Fine Foods – Proposed Frequent Shopper Rewards Program BSA/375 Todd Feuerherm December 21, 2014 Introduction In Figure 1, we have a basic example of the data being processed through our reward point’s program database. First we have qualifying purchases that determine what points from purchases are rewarded in the transaction. Then we have a designated purchase behavior section that will determine what the customer mostly likes in their purchases and what they mostly buy. Total allocated points are information of points gathered from the customer’s purchases and the total amount available in their rewards history. Preferred purchases is also their purchase behavior but a little more in-depth of what the customers like and are more likely to have interest in when making another purchase. This helps give out certain advertisements to our customers that, through their purchasing behavior, they will find most interesting and highly probable of purchasing. Scope For the scope of this project, implementing a tracking system for customer loyalty is the primary scope of the improvement. The implementation will have an effect throughout the organization as the new Information Technology (IT) customer tracking system will be implemented organization wide. Therefore the scope of examination should be limited to the sales and marketing sections. Scope creep should be limited to changes that provide a significant tangible or intangible impact on the overall business. Functions...

Words: 4865 - Pages: 20

Premium Essay

Hai, How Are U

...UNIVERSITY OF KERALA B. TECH. DEGREE COURSE 2008 ADMISSION REGULATIONS and I  VIII SEMESTERS SCHEME AND SYLLABUS of COMPUTER SCIENCE AND ENGINEERING B.Tech Comp. Sc. & Engg., University of Kerala 2 UNIVERSITY OF KERALA B.Tech Degree Course – 2008 Scheme REGULATIONS 1. Conditions for Admission Candidates for admission to the B.Tech degree course shall be required to have passed the Higher Secondary Examination, Kerala or 12th Standard V.H.S.E., C.B.S.E., I.S.C. or any examination accepted by the university as equivalent thereto obtaining not less than 50% in Mathematics and 50% in Mathematics, Physics and Chemistry/ Bio- technology/ Computer Science/ Biology put together, or a diploma in Engineering awarded by the Board of Technical Education, Kerala or an examination recognized as equivalent thereto after undergoing an institutional course of at least three years securing a minimum of 50 % marks in the final diploma examination subject to the usual concessions allowed for backward classes and other communities as specified from time to time. 2. Duration of the course i) The course for the B.Tech Degree shall extend over a period of four academic years comprising of eight semesters. The first and second semester shall be combined and each semester from third semester onwards shall cover the groups of subjects as given in the curriculum and scheme of examination ii) Each semester shall ordinarily comprise of not less than 400 working periods each of 60 minutes duration...

Words: 34195 - Pages: 137