Itc Lab Flowvchart
Itc Lab Flowvchart
Objective
To make students familiarize with nature of problem and its best possible solutions and then the most
efficient possible solutions.
Outcomes
Students will be able to identify the nature of problem and its solutions.
Content
1
To create an algorithm, we must:
An algorithm is often represented in pseudocode for clarity before being converted into a
specific programming language. Pseudocode provides a language-independent way to
describe an algorithm's logic, using human-readable terms and standard programming
constructs like conditional statements and sequential steps. It focuses on the overall
structure of the solution without worrying about specific syntax.
Let’s consider a simple example where we want to check if a given number is positive,
negative, or zero.
Algorithm
Pseudocode
START
Prompt the user to enter a number
Input number
IF number > 0 THEN
Output "The number is positive"
ELSE IF number < 0 THEN
Output "The number is negative"
ELSE
Output "The number is zero"
END
2
There are three common ways to represent an algorithm:
Design a flowchart and write pseudocode for organizing a library book borrowing process:
1. Start by asking the user for the book title they want to borrow.
2. Check if the book is available.
3. If the book is available, record the borrower’s name and due date for return.
4. Mark the book as borrowed and display "Borrowing successful."
5. If the book is not available, display "Book is currently unavailable."
Task 02:
Design a flowchart and write pseudocode to check attendance eligibility for a student to take
an exam:
3
Task 03: Create a flowchart and write pseudocode for a program that takes three integers as
input and finds the largest number among them.
Task 04: Create a flowchart and write pseudocode for a program that checks if a given year
is a leap year.
Task 05: Create a flowchart and write pseudocode for a program that calculates the
factorial of a given number.
Task 06: Create a flowchart and write pseudocode for a program that checks if a given
number is prime.
Task 07: Create a flowchart and write pseudocode for a program that calculates the simple
interest based on the principal amount, interest rate, and time period.
• Input: Principal amount (principal), interest rate (rate), and time period (time in
years).
• Output: Display the calculated simple interest.