This action might not be possible to undo. Are you sure you want to continue?

Welcome to Scribd! Start your free trial and access books, documents and more.Find out more

First Initial

Department of Mechanical and Aerospace Engineering

**ME 30 Computer Applications Lab Project Report Cover Sheet
**

Date 1/30/2013 Noone

Last Name

Proj. #

Name (print) Partners (if any) Project # Summary 1`

Komal Chakravarthi

First Name

03

Lab Section

Title

Developing an algorithm and geeting started with ch

During the course of this lab I learned various concepts like Algorithm, Pseudocode, flowchart, various symbols for drawing flowcharts. I also learned sequences, selections and repetitions. At the end of the lab there was an example of a flowchart incorporating all the aspects that were learned in the lab. Algorithm: A series of ambiguous operation that when executed will produces the desired results. Pseudocode: A recipe of sorts that can guide the programmer in creating an algorithm. Flowchart: A visual representation of the algorithm in a well placed order so that the final program can be visualized b the programmer. Sequence: A sequence is a series of steps that are executed on after the other. Selection: A Selection gives the user a choice to do the problem in different ways using IF, IF-ELSE, SWITCH. Repetition: A repetition is a repetition to a certain number of steps in the algorithm that is done over and over again until the desire condition is fulfilled. WHILE, DO-WHILE,FOR are sued to do this.

BJ Furman | ME 30 Computer Applications | lab_rpt_tpt.doc | 29JAN2011

Page 1 of 6

d) . Get the two numbers entered by the user. num1 and num2.Yes. Yes.1 Proj. IF num1 is greater than num2.the algorithm will produce an incorrect result. THEN 3.1 PRINT num1 is greater 4. IF num1 and num2 are equal . 2. 3.1 PRINT num2 is greater 5. Prompt user to enter two numbers. the algorithm will produce the correct result b) If the numbers entered are 27 and 12 then the since 27 is greater than 12. 1.THEN 5. Solution a) If the numbers entered are 12 and 27 then the printed number will be 27 since 12 is not greater than 27.ELSE 4.doc | 29JAN2011 Page 2 of 6 . Verification of Solution (if applicable) BJ Furman | ME 30 Computer Applications | lab_rpt_tpt. the algorithm will produce the correct result c) If the numbers entered are 27 and 27 then the printed number will be .Last Name SAN JOSÉ STATE UNIVERSITY First Initial Department of Mechanical and Aerospace Engineering ME 30 Computer Applications No. # Problem Description (brief) To consider a pseudocode prompt the user to enter two numbers and produce the num that is the greater of the two.1 PRINT both the nums are equal. 1.

Solution START Proj.Last Name SAN JOSÉ STATE UNIVERSITY First Initial Department of Mechanical and Aerospace Engineering ME 30 Computer Applications No.2 Create a flowchart for the algorithm from 1.doc | 29JAN2011 Page 3 of 6 .1. # Problem Description (brief) num1=0 num2=0 IF num1>num2 IF num1=num2 ELSE PRINT num1 PRINT both the numbers are equal PRINT num2 STOP Verification of Solution (if applicable) BJ Furman | ME 30 Computer Applications | lab_rpt_tpt. 1.

1.3 Usage* $0.1.1.Last Name SAN JOSÉ STATE UNIVERSITY First Initial Department of Mechanical and Aerospace Engineering ME 30 Computer Applications No. Prompt user to enter Level. # 1.doc | 29JAN2011 Page 4 of 6 .17 per kWhr +(200*0.1 IF Usage > 300 Then 5.12) 5.1 (Usage-300)* $0.1 (Usage-200)* $0. 2. 2. 4.1 Write a procedural algorithm in pseudocode for determining how much money will be owed at the end of a month for the electricity usage.1.1 IF Usage > 200 kWhr Then 4.12 per kWhr 5.1.17 per kWhr + (300*0.2 Else 5. IF customer is Level 2 then 5. Solution Problem Description (brief) Proj. Usage = 0 2.1.12) 4.2 Else 4.1 BJ Furman | ME 30 Computer Applications | lab_rpt_tpt. IF customer is Level 1 then 4.3 Usage* $0.12 per kWhr Verification of Solution (if applicable) No.

1 BJ Furman | ME 30 Computer Applications | lab_rpt_tpt.doc | 29JAN2011 Page 5 of 6 . ST Verification of Solution (if applicable) No.Last Name SAN JOSÉ STATE UNIVERSITY First Initial Department of Mechanical and Aerospace Engineering ME 30 Computer Applications Problem Description (brief) Proj. 3. # Write a procedural algorithm in pseudocode for determining how much money will be owed at the end of a month for the electricity usage.

2 Adding the terms to the Variable for Sum 5. Sum = 0. num2 = 0 . num6 = 0 . num8 = 0 . num9. num5 = 0 . 4. START 2. REPEAT 2. 4. 1. 4. num7. Take the Initial value as 0. num1. N=N+1. num8. num6. 2. num1= 0 . 8. Sum= Sum+N. Sum the given numbers. num3. UNTIL N=50 7.Last Name SAN JOSÉ STATE UNIVERSITY First Initial Department of Mechanical and Aerospace Engineering ME 30 Computer Applications Problem Description (brief) Proj. END 9. 10. PRINT Sum. num7= 0 . num10 = 0 . num4 = 0 . 1. 3. 4.doc | 29JAN2011 Page 6 of 6 . num3 = 0 . Print the result. # Algorithm: 1. 6. num5. num9 = 0 . num10. num2. ST Verification of Solution (if applicable) BJ Furman | ME 30 Computer Applications | lab_rpt_tpt. 3.1 Increment the Variable N 3. num4. Prompt user to enter ten numbers.

- L01-NumberSystems
- Systoloic Array
- C++ Matrix Class
- 13_pda2
- 13_pda2
- Cryptosystems based on Chebyshev Polynomials - Report
- Reference-Manual
- C Standard Lib Ref
- Vol1 Fe2009 Text
- rheolef
- Lecture 10 Strings
- Digital Principles and System Design
- 4-More-on-Sym-Ciphers.ppt
- Matlab Primer
- A Matlab Primer
- Web Tech Unit 3 Intro 1 ( B.Sc. IT - sem 2)
- from_MTL_to_DTA
- Java Quick Reference Guide
- klasi i objekti.doc
- IT62 Question Bank
- S YBTechComputer Engg.syllabus
- guide4-0-draft.pdf
- Particle Swarm Optimization Matlab Toolbox 1_conformat
- 3 Finite Automata
- How to Analyze Time Complexity
- Paper 8
- peld cnc
- DWH Concepts FAQs1
- 4 Basic Python
- 1 - 11 - 01.08ct.3. Intro to C++ (pointers, iterators) (14-01)

Are you sure?

This action might not be possible to undo. Are you sure you want to continue?

We've moved you to where you read on your other device.

Get the full title to continue

Get the full title to continue listening from where you left off, or restart the preview.

scribd