Free Essay

Algorithm and Psuedocode

In:

Submitted By mariofrazier
Words 256
Pages 2
short answers 5 & 6 pg.71
5. what two things must you normlally specify in a varaible declaration? the variable's name and the varaible data type
6. what value is stored in uninitalized varaibles? unpredictables values algorithm workbench questions 3- 10
3.statements that perform the following operations with the variables a.set b=2+ a b.set a = b*4 c. set b = 3/14/b d. set a = b = 8 4. variables results w,x, y and z all integers w=5 x=4 y=8 z=2 a. x=y = 4+ 8 b. 2*2 = 2*2 c. y/x = 8/4 d. y- 2 = 8-2
5. psuedocode statement declares varaible cost floating= point varaible cost
6.psuedocode that declares the caraible total declare real price= 99.95 display " orginal price" input item orginal price display price
7. pseudocode statement that assign the value 27 count = 27
8. pseudocode statement that assign the value of 10 and 14 declare integar total = 0 set total =10
9. psuedocode statement that subtracts the varaible downpayment declare integar downpayment declare integar total declare integar due set due total
10.puedocode statement that multiplies the variable subtotal declare variable subtotal 0.15 declare integar total declare total fee

pg.73 questions 6 & 8
6. design a program that will ask the user to enter the amount of a purchase. program should compute the stat and county tax. state sales tax is 4 % and the county sales tax is 2% count< how much did you purchase> cin

Similar Documents

Premium Essay

Systems Analysis and Design

...while we do have documentation, there is no consistency in it. A standardized method is in need to consolidate it and make the information understandable for users and stakeholders to use. One of the programmers suggested using psuedocode to standardize the documentation. However the advertising personnel are not familiar with that method. Had Al who is one of our newest programmers explained how Rouse (2005) stated that psuedocode “is a detailed yet readable description of what a computer program or algorithm must do” he might have received a different response from Mark in advertising. In addition, Al’s peer Flo and advertising executive David do not embrace the idea of using psuedocode. They have been using the systems development process with the use of CASE tools. The CASE tool can output graphical diagrams to give programmers a picture of what they are creating and non-technical users a map of sorts. It also provides “Compatibility between personalities implementing the tools and their relative expertise” (Borade, n.d.). Flo did not explain why she did not like psuedocode, only why she did not think it was a good solution at this point in the project. From taking in the information from the meeting, I believe both CASE tools and psuedocode can be used in the form of a user manual. Since the company is being downsized...

Words: 1880 - Pages: 8

Premium Essay

Unit 3

...uninitialized variable? • In some languages 0 is the default value to uninitialized variables. In other languages uninitialized variables hold random values. Algorithm Workbench 3. Write assignment statements that preform the following operations with the following variables a, b, and c. A. b = 2+a B. a = b*4 C. b = 3.14/a D. a = b-8 4. Assume the variables result, w, x, y, and z are all integers, and the w = 5, x = 4, y = 8, z = 2. What value will be stored in result in each of the following statement? A. x+y=4+5 B. z*2=2*2 C. y/x=8/4 D. y-z=8-2 5. Write a pseudocode statement that declares the variable cost so it can hold real number. • Floating-point variable cost 6. Write a pseudocode statement that declares the variable total so it can hold integer. Initialize the variable with the value 0. • Declare Real price = 99.95 • Display “the original price.’ • Input item original price • Display “price” 7. Write a pseudocode statement that assigns the value 27 to the variable count. • Count:=27 8. Write a pseudocode statement that assigns the sum of 10 and 14 to the variable total. • Set total = 10+14 9. Write a psudocode statement that subtracts the variable downPayment from the variable total and assign the results for the variable due. • Set due = total – downPayment 10. Write a psuedocode statement that multiplies the variable subtotal by .15 and assign the result to the variable totalFee. • Declare Int subtotal • Declare Int totalFee • Declare...

Words: 375 - Pages: 2

Premium Essay

Multimedia

...Skill Builder Week 1 Activity—Output and Pseudocode TCO 5 | Given a simple business problem, design and desk-check a solution algorithm that is expressed in terms of pseudocode or program notes and input-process-output (IPO) analysis leading to a flow chart. | Assignment: This activity will assist you in the understanding the input, process, and output (IPO) model using a provided set of data to write psuedocode ahead of processing the data and showing the results. 1. Rewrite the supplied data set in pseudocode format using proper verbs for describing input, process, or output needs along with assignment statements for calculations. 2. Perform calculations based on the pseudocode and assignment statements. 3. Show the result of each pseudocode program in the output display. Rubric: When completed, please submit the following items. 1. The instruction sheet. 2. Your answer sheet. Point distribution for this activity: Pseudocode Activity | Document | Points possible | Points received | Problem #1 | 6 | | Problem #2 | 6 | | Problem #3 | 8 | | Total Points | 20 | | Problem #Example: The variable A starts with the value 2. The variable B starts with the value 4. The variable C starts with the value 6. Store the value of A added to B in A. Store the value of B added to C in C. Multiply A times C, and store the result in B. Display the value in B on the screen. Pseudocode #Example: ...

Words: 696 - Pages: 3

Free Essay

Cpu Scheduling Algorithms Simulation

...FINAL YEAR PROJECT On DESIGNING A SIMULATOR TO IMPLEMENT A JOB SCHEDULER BASED ON DIFFERENT POPULAR CPU SCHEDULING ALGORITHMS Submitted as partial fulfillment for the award of BACHELOR OF TECHNOLOGY Session 2014-15 In Computer Science & Engineering Under the guidance of Mr.MrinmoySen By AnanyaDas(11/CS/15, ananyadas092@gmail.com, +919681851782) AnshumanMahanty(11/CS/23, anshumanmahanty1@gmail.com, +917501169824) SayaniBanerjee(11/CS/93, sayanibanerjee.1@gmail.com, +919046422003) HALDIA INSTITUTE OF TECHNOLOGY, HALDIA CERTIFICATE This is to certify that the final year project (CS792) on ‘Designing a Simulator implementing job scheduler based on different popular CPU scheduling algorithms’ has been completed and submitted successfully by the project members Ananya Das (11/CS/15), Anshuman Mahanty (11/CS/23) and Sayani Banerjee (11/CS/93). ------------------------- -------------------------------- --------------------------- Mr. Tarun Kumar Ghosh Mr. Sourav Mandal, Mr. Mrinmoy Sen Head of the Department, Convenor, Asst. Prof., Project Mentor, Asst. Prof., Computer Science & Engg. Project Evaluation Committee Department of CSE ACKNOWLEDGEMENTS We use this opportunity to express our gratitude to everyone who has supported us through the ongoing course of this final year project. The project owes its success not just...

Words: 6989 - Pages: 28

Free Essay

Fuzzy Control

...Fuzzy Control Kevin M. Passino Department of Electrical Engineering The Ohio State University Stephen Yurkovich Department of Electrical Engineering The Ohio State University An Imprint of Addison-Wesley Longman, Inc. Menlo Park, California • Reading, Massachusetts Don Mills, Ontaria • Sydney • Bonn • Harlow, England • Berkeley, California • Amsterdam • Mexico City ii Assistant Editor: Laura Cheu Editorial Assistant: Royden Tonomura Senior Production Editor: Teri Hyde Marketing Manager: Rob Merino Manufacturing Supervisor: Janet Weaver Art and Design Manager: Kevin Berry Cover Design: Yvo Riezebos (technical drawing by K. Passino) Text Design: Peter Vacek Design Macro Writer: William Erik Baxter Copyeditor: Brian Jones Proofreader: Holly McLean-Aldis Copyright c 1998 Addison Wesley Longman, Inc. All rights reserved. No part of this publication may be reproduced, or stored in a database or 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. Printed in the United States of America. Printed simultaneously in Canada. Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and AddisonWesley was aware of a trademark claim, the designations have been printed in initial caps or in all caps. MATLAB is a registered trademark of The MathWorks...

Words: 211473 - Pages: 846