0% found this document useful (0 votes)
22 views8 pages

Chapter 1 PIC SSM

The document provides definitions and explanations of algorithms and flowcharts, including their importance and advantages. It includes various algorithms and flowcharts for tasks such as checking for prime numbers, determining divisibility, and printing even numbers. Additionally, it describes the symbols used in flowcharting and their respective functions.

Uploaded by

abc413865
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views8 pages

Chapter 1 PIC SSM

The document provides definitions and explanations of algorithms and flowcharts, including their importance and advantages. It includes various algorithms and flowcharts for tasks such as checking for prime numbers, determining divisibility, and printing even numbers. Additionally, it describes the symbols used in flowcharting and their respective functions.

Uploaded by

abc413865
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Chapter-I

Q1. Define Algorithm (W18,2 marks)


Answer: Algorithm:- Algorithm is a stepwise set of instructions written to
perform a specific task.

Q2.State the use of following symbols used for flowchart drawing:(S18,2M)

Answer: 1) :General processing

2) : Decision Making

3) :Input/Output statements

4) : Start/Stop

Q3.Draw a flowchart of Do-while loop(S18,4Marks)


Q4.Draw a flowchart for checking whether given number is prime or
not.(S18,4Marks)

Answer:
Q5.Draw and label symbols used in flow chart.(W18,2Marks)

Importance of flowchart:

 Sometimes it's more effective to visualize something graphically that it is to describe it with
words.
 Flowchart is the tool which helps to represent logic of the program pictorially.
 Flowcharts explain a process clearly through symbols and text.
Q6. Write an algorithm to determine whether a given number is
Divisible by 5 or not (W18, 4Marks)

Step 1- Start
Step 2- Read / input the number.
Step 3- if n%5==0 then goto step 5.
Step 4- else number is not divisible by 5 goto step 6.
Step 5- display the output number is divisible by 5.
Step 6- Stop

Q7.Write algorithm and draw flow-chart to print even numbers


From 1 to 100.(W18,4Marks)(2 marks for algo and 2 marks for flowchart)

Algorithm
1. Start
2. Initialize the variable i to 1.
3. while i<=100
4. if i%2==0
5. print the number
6. increment value of i
7. stop

Q8.State any four advantages of using flow-chart. (Any four advantages –


1Mark each) Ans:
1. Flowchart is the tool which helps to represent logic of the program pictorially
because it is always more effective to visualize something graphically than to
describe with words.
2. Flowcharts explain a process clearly through symbols.
3. It shows logical flow of the program accurately.
4. It is an important tool for planning and designing a new system.
5. It makes sure that no logical path is left incomplete without any action being
taken.
6. It provides an overview of the system and also demonstrates the relationship
between various steps.
Q8. Draw flowchart for checking whether given number is even or
odd.(S19,2 Marks)
Q9.Draw flowchart for checking weather given number is prime or not(S19,4M)
Q10.Draw flowchart for finding largest number among three numbers.(S19,4M)

Q11.Algorithm to check whether a no is odd or even

1. Read the given number i


2. Divide i by 2
3. If rem=1 ,then print odd
4. Else, print even

Q12.Algorithm to find factorial of a given no


1. Read the no, say x
2. multiply the no by(x-1) and store the result , say y
3. repeat step2 until x becomes 1
4. print final value of y

Q13. Algorithm for swapping two numbers using third variable:


1. start
2. declare variables a, b, c
3. read value of a& b
4. copy value of a to c ; b to a; & c to b.(i.e. c=a; a=b; b=c)
5. print swapped values of a & b
6. exit
Q14. Explain the following terms(4M)
(i) Algorithm
(ii) Flowchart
(i) algorithm: It is a step by step procedure to solve a problem.
Starting from the initial step and input it proceeds in a sequential step
by step way to get the output.
Eg: The algorithm to add two numbers can be written in the following
way:
1. start
2. declare 3 variables a,b,c;
3. get the input values for the variables a and b
4. calculate the sum c = a+b
5. display the output c
6. stop
(ii) Flowchart: It is the diagrammatic representation of methodically
solving a problem. It can also be called as the diagrammatic
representation of an algorithm.
The different symbols used in flowcharts are:

You might also like