You are on page 1of 2

NMK10603: C Programming (Lab Exercise 1)

EKT 120 – Computer Programming Laboratory Module


Q1:

2.4 Write a program that calculates marked area of the circle, given input from the user
r1 and r2.

r2

r1

a. Write down the pseudo code and flowchart for the program:

b. Write your program based on pseudo code and flowchart in (a):

4
EKT 120 – Computer Programming Laboratory Module
Q2:

2.5 Write a program to find the equivalent series and parallel resistance for 3 resistor
values. Your program should scan the 3 resistor values and then compute the
equivalent series and parallel resistance for all 3 resistors. For example, if the 3
resistor values are r1=100, r2=200 and r3=300 ohms, respectively, their equivalent
series resistance is r1 + r2 + r3 = 100 + 200 + 300 = 600 ohms and their equivalent
parallel resistance = 1 / [1/r1 + 1/r2 + 1/r3] = 1/[0.01+0.005+0.0033] = 54.55 ohms.

a. Write down the pseudo code and flowchart for the program:

b. Write your program based on pseudo code and flowchart in (a):

You might also like