Professional Documents
Culture Documents
CS101 - Assig.02 - Lesson17 - Marks Obtained 16 Out of 20 - Enjoy It - Fall 2014
CS101 - Assig.02 - Lesson17 - Marks Obtained 16 Out of 20 - Enjoy It - Fall 2014
02 (Graded)
Semester: Fall 2014
Introduction to Computing CS101
Question no.1
Suppose you are a part of a software development team and you are asked to draw a flow chart of
algorithm given below.
Algorithm:
1.
2.
3.
4.
Start
Declare two variables and initialize them with 0( SUM_ODD=0, and SUM_EVEN=0)
Input n
Repeat while n>0
If(n%2==0)
SUM_EVEN=SUM_EVEN + n
else
SUM_ODD=SUM_ODD + n
n=n-1
5. Print SUM_EVEN and SUM_ODD
6. Stop
Flow chart
Start
Data Input
N%2==0
True
False
SUM_EVEN= SUM_EVEN + n
SUM_ODD= SUM_ODD + n
incorrect
n + n-1
incorrect
n>0
True
Print SUM_EVEN
Print SUM_ODD
False
Stop
Question no.2
In figure 1 there is a text box, a paragraph and uses of latexs list. You are required to re-write/type the
given text in MS word.
Solution:
Uses of Latex:
1. High typographical
quality of
documents