2 Simplicity each step of the algorithm performs one logical step in solving

# 2 simplicity each step of the algorithm performs one

• 28

This preview shows page 8 - 14 out of 28 pages.

2. Simplicity - each step of the algorithm performs one logical step in solving the problem. 3. Precision - each step of the algorithm is unambiguous in meaning. 4. Comprehensibility - the algorithm is easy to read and understand. 5. Abstraction - presents the solution steps precisely and concisely without referring to low-level (program code) details. 6. Efficient - Gives results rapidly based on the problem size; does not waste any space or time. 7. Easy to Implement - relatively easy to translate into a programming language.
©LPU CSE101 C Programming Steps to create an Algorithm 1. Identify the Inputs What data do I need? How will I get the data? In what format will the data be? 2. Identify the Outputs What outputs do I need to return to the user? What format should the outputs take? Quick yak: Form ulate examples on conversation… Ask a question When would you be 34 years old Let them craft a logic for answer!!!
©LPU CSE101 C Programming Steps to create an Algorithm 3. Identify the Processes How can I manipulate data to produce meaningful results? Data vs. Information 4. Break the Solution to steps By breaking the solution to the steps we can easily understand the logic of program
©LPU CSE101 C Programming Example of Algorithm To establish a telephone communication Step 1: Dial a phone number Step 2: Phone rings at the called party Step 3: Caller waits for the response Step 4: Called party picks up the phone Step 5: Conversation begins between them Step 6: After the conversation, both disconnect the call
©LPU CSE101 C Programming Algorithm: Add 2 Numbers Problem: To add two numbers. Step1. Start. Step2. Take the two numbers. Step3. Add them. Step4. Print the result. Step5. Stop.
©LPU CSE101 C Programming Pseudocode Pseudocode is similar to everyday English language, its convenient and user friendly It’s not a actual computer programming language. Pseudocode consist only of action statements In pseudocode representation Each of steps will be written

#### You've reached the end of your free preview.

Want to read all 28 pages?

• Spring '18
• Aman

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern