Beruflich Dokumente
Kultur Dokumente
computers
• Block Diagram of a Computer
• Computer Memories
• Algorithms &Flowcharts
• C++ Fundamentals
• Operators and Expressions
• Flow of control
• Derived Data types
• Functions
• OOPs
12/07/21 Dept of CS&Engg. 1
References:
Dept of CS&Engg. 5
Flow of Information
• The parts are connected to one another by a
collection of wires called a bus
System Software :
Collection of programs written for computer system
management. They are supervisory programs and
help in executing the user’s programs effectively.
Types:
(i) Operating System,
(ii) Language Processors and
(iii) System Utilities.
12/07/21 Dept of CS&Engg 25
Operating System (OS) :
Assembly Language :
uses symbolic instructions.
e.g., ADD X,Y; Add the contents of y to x
12/07/21 Dept of CS&Engg 29
Algorithms & Flowcharts
• Step Number
• Explanatory comment
• Termination
Step 5: Print L
Step 6: [End of Algorithm]
Stop
Step 3: AB
Step 4: Btemp
Step 2: AA+B
Step 3: BA-B
Step 4: AA-B
Step 2: Sum 0
Read A, B, C
A>B
A>C B>C
Print B Print C
Print A Print C
Stop
Q Show using flowchart how to find the average height of boys and
average height of girls in the class.
Ans:
t_b_h total boys height
t_g_h total girls height
t_b total no of boys
t_g total no of girls
a_v_b average height of boys
a_v_g average height of girls
n total no of students
n1 no of boys and girls after each iteration
code=0 (for girl)
code=1 (for boy)
start
t_b_h 0
t_b 0
t_g_h 0
t_g 0
n 10
a_v_g 0
a_v_b 0
n1 0
B
read roll no , code , height
Y N
code =1
A
A
Stop
Start
To find
Read n , num1 largest of n
numbers
using 2
memory
repeat till 4 , locations
till n = 1 num1 and
num2
read num2
n n-1
4
Print num1
stop
Q) Draw a flowchart to count the number of non-zero numbers in a
series of 10 numbers.
Start
nzd 0,
i=1
repeat till 4 ,
till i=11
enter d
i i+1
Print nzd
stop
Draw a flowchart to find the sum of the first 50
natural numbers
Draw a flowchart for computing factorial of N
QUESTIONS TO BE SOLVED BY YOU
Write an algorithm and draw a flow chart for the following problems
1. Read a number N and print all its divisors.
2. Compute the sum of the digits of any given number
3. Find the sum of given N numbers.
4. Sum of squares of integers from 1 to 50
5. Print the Message “Hello” on the Screen.
6. Display a Triangle of * on the screen.
7. Perform the different arithmetic Operations.
8. Evaluate the area of the circle Area = Pi * R*R
9. Convert the time in seconds to hours, minutes and seconds. (1 hr
=3600 sec).
10. Find the sum of the digits of a four-digit number (ex 1234 sum=10).
11. Convert temperature given in Fahrenheit to Centigrade and
Centigrade to Fahrenheit (C=5/9(F-32)).
12. Converting distance in mm to cm, inch, feet (1 cm =10mm,
1inch=2.5cm, 1 feet =12 inches).
13. Compute nth Fibonacci no.
14. Generate Fibonacci series up to n.
15. Covert binary number to decimal.
16. Convert decimal number (Positive) to binary.