Algorithm Example PDF

Summary

This document explains algorithms as step-by-step procedures to solve problems. It provides a simple example of an algorithm to find the sum of two numbers. The document discusses input, processing, and output in an algorithm.

Full Transcript

.9. What is algorithm? Ghive simple e Kample of Alqerithm. step by step pYoccdure A An alaovithm task oY set a lls desiancdt takes...

.9. What is algorithm? Ghive simple e Kample of Alqerithm. step by step pYoccdure A An alaovithm task oY set a lls desiancdt takes do perporm Salve problem, input, prce ssesit an CA se nes well ~defined steps, and pvoduces examplg (reate an dlysrithm to gind the Sum numberS. Date Page Alqo xithmi Stort, 2Inpu the Fixs number Clet's call it A'). 3nput the Seeond numbe Process; add A and C lets col) it 'B'). Qnot B'togethe r Store -the varible sum' Qutpud he vaJue sum, End This algoriihm tahes DumbeYS aS inpds, add and 4hen odpus the sum

Use Quizgecko on...
Browser
Browser