Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 5

Assignment No.

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:

aTeX is a high-quality typesetting system; it includes features designed for the


production of technical and scientific documentation. LaTeX is the de facto standard for
the communication and publication of scientific documents.

Uses of Latex:
1. High typographical
quality of
documents

2. You can have more


focus on the
content rather than

how that content is


looking
3. More control over
formatting of the
document

Moazz Give Us Past Papers


I'm trying to Give everyone Assignment Solutions :)
You Can Help Me By Sharing your
Assignment Solutions In the End Of Smester :)
This will help Our Newcomer Students :)
Send me your LMS ID PASS so I can make a good collection for students
Email me: bc130402273@vu.edu.pk
Regards:Haroon Malik

You might also like