Professional Documents
Culture Documents
Fundamentals of Algorithms
CS – 201
Instructor
Ms. Saher Naqi
Submitted By
Mr. Muhammad. Irfan Arshad
Roll Number: 1387
BS – CS (3rd Semester)
return percentage
Problem Statement 2:
50 students of a class appear in the problem 1. Draw a
flowchart for the algorithm to calculate and print the percentage marks obtained by
each student along with his roll number.
Problem Statement 3:
Draw a flow chart of the logical steps needed to produce
a printed listing of all students over the age of 20 in a class. The input records
contain the name and age of the students. Assume an initial value of 99 for the age
field.
START
If
age >20
Yes
Process on data
STOP
Problem Statement 4:
Draw a flowchart of the logical steps needed to print the
name and age of the oldest and the youngest student in a class. The input records
contain the name and age of the students.
START
Youngest Oldest
STOP
Problem Statement 5:
A set of examination papers which have been graded with
scores from 0 to 100 is to be searched to find how many of them are above 90. The
total is to be printed.
START
Enter scores
(0-100)
If
Yes scores >90 Loop
No
Add total marks
STOP
1.Input
2.Output
3.Definiteness
4.Effectiveness
5.Termination
Therefore, an algorithm can be defined as a sequence of definite and effective instructions, which
terminates with the production of correct output from the given input.
In other words, viewed little more formally, an algorithm is a step by step formalization of a
mapping function to map input set onto an output set.