Monday, February 16, 2026

ALGORITHM AND FLOWCHART 16-20


Unit 7: Algorithm and Flowchart

7.1 Understanding the Problem

7.1.1 Describe the following steps of the problem-solving process:

  • a. Define the problem

  • b. Analyse the problem

  • c. Planning the solution of the problem

  • d. Find candid solutions of the problem

  • e. Select the best solution


7.2 Algorithm

7.2.1 Define an algorithm. 7.2.2 Describe the following four essential parts of an algorithm:

  • a. Inputs

  • b. Processing

  • c. Decision

  • d. Outputs 

7.1 Understanding the Problem

When we solve a problem using a computer (for example in C language), we follow some steps. These steps help us write correct programs.


7.1.1 Steps of the Problem-Solving Process


a. Define the Problem

This is the first and most important step.

To define the problem means:

  • Clearly understand what we have to do

  • Know what the user wants

  • Know what result is required

Simple Meaning:

Before writing any program, we must clearly say:

"What is the problem?"

Example:

Problem:
"Write a program to calculate the average of three numbers."

Here the problem is clearly defined:

  • Input: 3 numbers

  • Output: Average

If we don’t define the problem properly, the program may give wrong results.


b. Analyse the Problem

After defining the problem, we must analyze it.

To analyze means:

  • Break the problem into smaller parts

  • Identify:

    • What are the inputs

    • What processing is required

    • What will be the output

Example:

Problem: Calculate average of 3 numbers.

Analysis:

  • Inputs → Number1, Number2, Number3

  • Process → Add them and divide by 3

  • Output → Average

In C language, this means:

  • We need 3 variables for input

  • 1 variable for average

  • Use formula:

    average = (num1 + num2 + num3) / 3;

c. Planning the Solution of the Problem

Now we plan how to solve the problem.

This includes:

  • Writing algorithm

  • Drawing flowchart

  • Deciding variables

  • Deciding formulas

Simple Meaning:

We decide:

"How will we solve the problem step by step?"

Example Plan:

  1. Start

  2. Input 3 numbers

  3. Add numbers

  4. Divide by 3

  5. Display average

  6. Stop

Planning helps us avoid errors while writing C program.


d. Find Candidate Solutions of the Problem

Sometimes a problem can be solved in more than one way.

Candidate solutions mean:

  • Different possible methods to solve the same problem.

Example:

Problem: Check whether a number is positive or negative.

Method 1:

  • Use if (num > 0)

Method 2:

  • Use ternary operator:

    (num > 0) ? "Positive" : "Negative";

Both are correct solutions. These are candidate solutions.


e. Select the Best Solution

After finding different solutions, we select the best one.

Best solution means:

  • Easy to understand

  • Uses less memory

  • Runs faster

  • Simple logic

Example:

Between:

  • Complex nested conditions

  • Simple if-else

We select:
✔ Simple if-else because it is easier for students to understand.


7.2 Algorithm


7.2.1 Define an Algorithm

Definition:

An algorithm is a step-by-step procedure to solve a problem.

It is written in simple English language.

It tells:

  • What to do

  • In what order to do

Before writing C program, we first write algorithm.


Example Algorithm:

Problem: Add two numbers

  1. Start

  2. Input number1

  3. Input number2

  4. sum = number1 + number2

  5. Display sum

  6. Stop

This is an algorithm.


7.2.2 Four Essential Parts of an Algorithm

Every algorithm has four important parts.


a. Inputs

Inputs are:

  • The data given to the program

  • Values entered by the user

In C language:
We use:

scanf()

Example:

If we calculate area of rectangle:

  • Input → length and width


b. Processing

Processing means:

  • Performing calculations

  • Applying formulas

  • Doing logical operations

In C language:
We use:

  • Arithmetic operators (+, -, *, /)

  • Assignment operator (=)

Example:

area = length * width;

This step is called processing.


c. Decision

Decision means:

  • Making a choice

  • Checking conditions

In C language:
We use:

  • if

  • if-else

  • switch

Example:

If we check even or odd:

if (num % 2 == 0) printf("Even"); else printf("Odd");

This is decision making.


d. Outputs

Output means:

  • The final result of the program

  • What we show to the user

In C language:
We use:

printf()

Example:

printf("The sum is %d", sum);

✅ Summary

Problem Solving Steps:

  1. Define the problem

  2. Analyse the problem

  3. Plan the solution

  4. Find possible solutions

  5. Select best solution

Algorithm:

  • A step-by-step method to solve a problem.

Four Parts of Algorithm:

  • Input

  • Processing

  • Decision

  • Output

7.2.3 Write algorithms for solving problems, i.e.:
  • a. Performing arithmetic, relational, and logical operations

  • b. Calculating the volume of geometrical shapes

  • c. Finding the area of various geometrical shapes

  • d. Converting from one unit to another unit of physical quantities

  • e. Finding the maximum and minimum from input values

  • f. Performing the counting and totaling on given values

  • g. Applying the repetition process

  • h. Applying the selection process


7.3 Flowchart

7.3.1 Define a program flowchart. 

7.3.2 Describe the importance of a program flowchart for solving a problem. 

7.3.3 Identify the flowchart symbols for the following:

  • a. Input

  • b. Process

  • c. Decision making

  • d. Outputs

  • e. Terminator/terminal point

  • f. Connectors

7.3.1 Define a Program Flowchart

Definition:

A program flowchart is a diagram that shows the steps of a program using symbols.

It shows:

  • What step comes first

  • What step comes next

  • How the program flows

  • Where decisions are made

A flowchart uses standard symbols connected with arrows.


Simple Meaning:

An algorithm is written in words.
A flowchart shows the same steps in picture form (diagram form).


Example:

Problem: Add two numbers

Algorithm:

  1. Start

  2. Input two numbers

  3. Add numbers

  4. Display result

  5. Stop

Flowchart shows the same steps using symbols and arrows.


7.3.2 Importance of a Program Flowchart

Flowchart is very important before writing a C program.


✅ 1. Makes the Problem Easy to Understand

When we see the problem in diagram form, it becomes easier to understand.

Instead of reading long text, we can understand quickly by looking at the symbols.


✅ 2. Helps in Planning the Program

Flowchart helps programmers:

  • Arrange steps in correct order

  • Avoid missing steps

  • Remove logical mistakes

Before writing code in C, drawing a flowchart reduces errors.


✅ 3. Makes Debugging Easy

If there is a mistake:

  • We can easily find it in the flowchart

  • Then correct the logic

This saves time.


✅ 4. Improves Communication

Flowcharts help:

  • Teachers explain programs

  • Students understand logic

  • Programmers discuss ideas

Even a person who does not know C language can understand the flowchart.


✅ 5. Converts Easily into C Program

Each symbol in flowchart matches C statements:

  • Input symbol → scanf()

  • Process symbol → calculations

  • Decision symbol → if-else

  • Output symbol → printf()

7.3.3 Flowchart Symbols

Now we will identify and explain important symbols.


a. Input Symbol



Shape:

Parallelogram


Use:

Used to take input from user.

C Language Example:

scanf("%d", &num);

Example in Flowchart:

Input number


b. Process Symbol

Shape:

Rectangle


Use:

Used for:

  • Calculations

  • Assignments

  • Processing data

C Language Example:

sum = num1 + num2;

c. Decision Making Symbol

Shape:

Diamond


Use:

Used when condition is checked.

It has:

  • Two outputs → Yes / No

  • True / False

C Language Example:

if (num % 2 == 0)

d. Output Symbol

Shape:

Parallelogram (same as input)

Use:

Used to display result.


C Language Example:

printf("Result = %d", sum);

e. Terminator / Terminal Point

✅ Summary Table

SymbolShapeUsed ForC Language Example
InputParallelogramTake inputscanf()
ProcessRectangleCalculationsum = a + b
DecisionDiamondCondition checkingif-else
OutputParallelogramDisplay resultprintf()
TerminatorOvalStart / StopStart, End
ConnectorCircleJoin flow linesContinue 

7.3.4 Draw flowcharts for the problems mentioned in SLO 7.2.3. 

7.3.5 Complete the trace table for a given flowchart.

Sunday, February 15, 2026

EMAIL ID

SUBMIT YOUR C++ PRACTICALS ALONG WITH MS EXCEL PRACTICAL ON

sbhs2mail@gmail.com

Sunday, February 8, 2026

AKUEB PRACTICALS MS Office

 


13.1.1   Prepare a spreadsheet by naming cells and sheets.

13.1.1   Use different options of paste special (value, format, formula).

13.1.1   Print a spreadsheet.

13.1.2   Apply cell formatting tools (number, alignment, font, border, fill).

13.1.3   Apply functions (sum, average, count, minimum, maximum).

13.1.4   Insert a pie chart and bar graph in the data sheet.

13.1.5   Apply filter and data validation on spreadsheet data.

13.1.5   Protect a worksheet.

13.1.5   Lock/unlock cells of spreadsheet.

___________________________________________________________________________________

You can include steps from here👇

1. Naming Cells and Sheets

  • Rename Sheet: Double-click the tab at the bottom (e.g., "Sheet1") and type a new name, then press Enter.

  • Name a Cell: Click a cell (e.g., A1). In the Name Box (top left, next to the formula bar), type a name like Total_Sales and press Enter.

2. Paste Special Options

Copy a cell (Ctrl+C), then right-click the destination cell:

  • Values: Pastes only the result of a formula, not the formula itself.

  • Formulas: Pastes the formula but keeps the destination formatting.

  • Formats: Pastes only the styling (colors, borders) without the content.

3. Printing

  • Go to File > Print (or Ctrl+P).

  • Tip: Use "Set Print Area" under the Page Layout tab to print only a specific selection.

4. Cell Formatting

  • Right-click a cell and select Format Cells to access:

    • Number: Set decimals or currency.

    • Alignment: Wrap text or merge cells.

    • Font/Border/Fill: Change text style, add grids, or background colors.

5. Basic Functions

Use these formulas in the formula bar:

  • SUM: =SUM(A1:A10)

  • AVERAGE: =AVERAGE(A1:A10)

  • COUNT: =COUNT(A1:A10) (counts cells with numbers)

  • MIN/MAX: =MIN(A1:A10) or =MAX(A1:A10)

6. Charts & Graphs

  1. Highlight your data.

  2. Go to the Insert tab.

  3. Select Pie Chart for proportional data or Bar Graph for comparisons.

7. Filter and Data Validation

  • Filter: Select headers > Data tab > Filter. Click the arrow on the header to sort or hide data.

  • Data Validation: Data tab > Data Validation. Use this to restrict cell input (e.g., only allow whole numbers between 1 and 100).

8. Protect & Lock Cells

  • Protect Worksheet: Go to Review > Protect Sheet. Set a password to prevent others from editing.

  • Lock/Unlock: By default, all cells are locked when a sheet is protected. To unlock specific cells, right-click them > Format Cells > Protection > uncheck Locked before protecting the sheet.

Monday, January 26, 2026

AKUEB PRACTICALS C Programming

 submit practical on Email by 29th Jan 2026: sbhs2mail@gmail.com


Write C programs to declare and initialise variables using different data types (char, int, float, char [ ]).
Q 8.4.4: Declare and initialize variables and constants
Q 8.4.5: Implicit vs explicit type casting
Q 9.1.1: Output with putchar, puts, printf
Q 9.1.3: Input with scanf, getch, getche, getchar, gets

Write C programs that use format specifiers (%d, %f, %s, %c), escape sequences (alert, backspace, newline, carriage return, tab, backslash, single quotation mark, double quotation mark, question mark), comments (//, /* */).

Q 9.1.2: Format specifiers examples
Q 9.1.5: Common escape sequences

Write C programs that use operators and its types

Q 9.2.1: Arithmetic operators
Q 9.2.2: Convert arithmetic expression to C
Q 9.2.3: Solve an arithmetic problem
Q 9.2.4: Assignment and compound assignment
Q 9.2.5: Increment and decrement
Q 9.2.6: Relational operators
Q 9.2.7: Logical operators
Q 9.2.10: Conditional (ternary) operator
Q 9.2.11: Operator precedence (simple idea)

Write C programs for each if, if-else and if-else-if.

Q 10.1.4: Program using if
Q 10.1.6: Program using if-else
Q 10.1.8: Program using if-else-if (grading)

Write C programs using switch statement.

Q 10.1.11: Program using switch


FORMAT FOR MS WORD









































Tuesday, January 13, 2026

PRACTICALS

PERFORM ALL THESE PRACTICALS IN DEV C++ AND ALSO WRITE IT DOWN IN YOUR REGISTER

1. Write a program to find the sum of two numbers using printf() and scanf() statements.
2. Write a program to find subtraction of two numbers using assignment (=) operators
3. Write a program to find multiplication and division of two numbers.
4. Write a program to calculate the area and circumference of a circle.
const float pi=3.1415926
FORMULA area = pi * radius * radius
                    circum = 2*pi*radius

5. Write a program to calculate the area of right-angle triangle.
FORMULA area = 0.5*base*height
6. Write a program to calculate the area of rectangle.
FORMULA area = length*width
7. Write a program to calculate sum of 5 subjects and find percentage.
8. Write a program to compare two integers using if ()-else statements.
9. Write a program to compare three integers.
10. Write a program to find whether the number is even or odd.





















11. Write a program to find if a given number is positive or negative.
12. Write a program to convert temperature from degree Centigrade to Fahrenheit.
Formula: fah=(9.0/5.0*cell)+32 
13. Write a program to convert temperature from degree Centigrade to Fahrenheit.