Page 1 :
Algorithms:An algorithm (pronounced AL-go-rith-um) is a procedure or formula for solving a problem. The word derives from the name of the, mathematician, Mohammed ibn-Musa al-Khwarizmi, who was part of the royal court in Baghdad and who lived from about 780 to 850., Al-Khwarizmi's work is the likely source for the word algebra as well., An algorithm is any well defined computational procedure that takes some value or set of values as input and produces some value or, set of values as output. An algorithm is thus a sequence of computational steps that transform the input into the output. A method that, can be used by a computer for the solution of a problem., We can also view an algorithm as a tool for solving a well-specified computational problem. The statement of the problem specifies in, general terms the desired input/output relationship. The algorithm describes a specific computational procedure for achieving that, input/output relationship., , Example: - Algorithm for Addition of two numbers:, Step1: Start, Step2: Declare Variables, Step3: Read num1 and num2., Step4: Add num1 and num2, Step5: Store result in num3., Step6: Display result as num3., Step7: Stop, , Flowcharts:A flowchart is a type of diagram that represents an algorithm or process, showing the steps as boxes of various kinds, and, their order by connecting these with arrows. This diagrammatic representation can give a step-by-step solution to a given, problem. Process operations are represented in these boxes, and arrows connecting them represent flow of control., Flowcharts are used in designing and documenting complex processes or programs. Like other types of diagrams, they help, visualize what is going on and thereby help the viewer to understand a process.
Page 2 :
There are many different types of flowcharts, and each type has its own repertoire of boxes and notational conventions. The, two most common types of boxes in a flowchart are: a processing step, usually called activity, and denoted as a rectangular, box a decision, usually denoted as a diamond., , Symbols:A typical flowchart from basic computer science textbooks may have the following kinds of symbols:, 1 Start and end symbols:Represented as circles, ovals or rounded rectangles, usually containing the word "Start" or "End", or another phrase, signalling the start or end of a process, such as "submit inquiry" or "receive product"., Symbol:-, , 2 Arrows:Showing "flow of control". An arrow coming from one symbol and ending at another symbol represents that control passes to, the symbol the arrow points to. The line for the arrow can be solid or dashed. The meaning of the arrow with dashed line may, differ from one flowchart to another and can be defined in the legend., , Symbol:-, , 3 Generic processing steps:Represented as rectangles. Examples: "Add 1 to X"; "replace identified part"; "save changes" or similar., Symbol:-
Page 3 :
4 Input/output:Represented as a parallelogram. Examples: Get X from the user; display X., Symbol:-, , 5 Conditional or decision:Represented as a diamond (rhombus) showing where a decision is necessary, commonly a Yes/No question or True/False, test. The conditional symbol is peculiar in that it has two arrows coming out of it, usually from the bottom point and right point,, one corresponding to Yes or True, and one corresponding to No or False. (The arrows should always be labeled.) More than, two arrows can be used, but this is normally a clear indicator that a complex decision is being taken, in which case it may, need to be broken-down further or replaced with the "predefined process" symbol., , Symbol:-, , 6 Labelled connectors:Represented by an identifying label inside a circle. Labelled connectors are used in complex or multi sheet diagrams to, substitute for arrows. For each label, the "outflow" connector must always be unique, but there may be any number of, "inflow" connectors. In this case, a junction in control flow is implied., , Symbol:-
Page 4 :
Example:- Flowchart for Addition of two numbers., , Fig : A flowchart for Addition of two numbers