NotesMitra – Free & premium IGNOU notes, PYQs and solved assignments

MCS-011 · Unit 1

Problem Solving

The steps of problem solving, algorithms, flowcharts and their symbols, with a worked example — the foundation for writing C programs.

Steps in problem solving

Before writing any program, follow these steps:

  1. Understand the problem – What is given (input)? What is required (output)?
  2. Analyse – Identify the conditions, formulas and constraints.
  3. Design a solution – Write an algorithm or draw a flowchart.
  4. Code – Translate the design into a programming language like C.
  5. Test and debug – Run with sample inputs and fix errors.
  6. Document – Add comments so others (and you, later) can understand it.

Algorithm

An algorithm is a step-by-step procedure to solve a problem in a finite number of steps.

Example: Check whether a number is even or odd

Step 1: Start
Step 2: Read number N
Step 3: If N % 2 == 0, print "Even"
Step 4: Otherwise, print "Odd"
Step 5: Stop

Flowchart

A flowchart is a diagram that shows the steps of an algorithm using standard symbols.

Symbol Name Used for
Oval Terminal Start / Stop
Parallelogram Input/Output Read or print data
Rectangle Process Calculations, assignments
Diamond Decision Yes/No conditions
Arrow Flow line Direction of flow

Exam tip: When asked to "draw a flowchart", always begin with a Start oval and end with a Stop oval, and label every decision branch Yes or No.

The same example in C

#include <stdio.h>

int main(void) {
    int n;
    printf("Enter a number: ");
    scanf("%d", &n);

    if (n % 2 == 0)
        printf("%d is Even\n", n);
    else
        printf("%d is Odd\n", n);

    return 0;
}

Quick revision

  • Problem solving = understand → analyse → design → code → test → document.
  • An algorithm is written in steps; a flowchart shows the same steps as a diagram.
  • Learn the five basic flowchart symbols — they are asked often.

Original notes by NotesMitra · Updated 29 Nov 2026

Report a problem