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

2 simplicity each step of the algorithm performs one

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.
Image of page 8
©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!!!
Image of page 9
©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
Image of page 10
©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
Image of page 11
©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.
Image of page 12
©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
Image of page 13
Image of page 14

You've reached the end of your free preview.

Want to read all 28 pages?

  • Spring '18
  • Aman

What students are saying

  • Left Quote Icon

    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.

    Student Picture

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

  • Left Quote Icon

    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.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    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.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors