Manual solutions to real life problem
Here are some steps you can take to solve a real life problem:
Identify the problem: Define the problem as clearly as possible.
Breakdown the Problem: Consider breaking the problem into smaller pieces.
Analyze the root Cause: Determine the reason for the problem.
Generate solutions: Consider multiple solutions and evaluate them.
Decide on a solution: Choose a solution and implement it.
Evaluate the outcome: Check in on the problem and evaluate the results
Algorithms:
An algorithm is a finite sequence of well-defined instructions that can be used to solve a
computational problem. It provides a step-by-step procedure that convert an input into a
desired output.
Properties/ Characteristics
Input: An algorithm must receive a or more data supplied externally.
Output: An algorithm must produce at least one output as a result.
Finiteness: Must contain finite number of steps
Definiteness: Must be clear and unambiguous.
Effectiveness: Can be solved using pen & paper without applying intelligence.
Example:
Step 1: Start
Step 2: Read a,b
Step 3: C=a+b
Step 4: Print or display c
Step 5: Stop
Flowchart and Pseudo Code
Flowchart:
A flowchart is a diagram that illustrates a process, system, or algorithm in a step-by-step
manner. It's a versatile tool that can be used to plan, visualize, document, and improve
processes.
Example:
Start
Read a,b
C=a+b
Write c
Stop
Pseudo Code:
A Pseudocode is a step-by-step description of an algorithm in code-like structure using plain
English text.
Example:
# include<stdio.h>
Int main()
{
Int a, b, c;
Printf(“enter value of a:”);
Scanf(“%d”,&a);
Printf(“enter value of b:”);
Scanf(“%d”,&b);
c=a+b;
Printf(“Sum of given two number is: %d ”,c);-
Return 0;
}