0% found this document useful (0 votes)
25 views4 pages

Programming Fundamental 2

Uploaded by

wamiq0508
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views4 pages

Programming Fundamental 2

Uploaded by

wamiq0508
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PROGRAMMING FUNDAMENTAL

LAB Report 02

NAME : REGISTRATION NUMBER:

UZAIR AHMED FA23-BCE-048

For The Course


PROGRAMMING FUNDAMENTAL
DATE : MARCH 2024

SUBMITTED TO : Usman Khalid


EXERCISE #1

Write a C++ program to display the total resistance of a series circuit with given resistances,
when R1= 1.5 ohm, R2= 20 ohm and R3= 4.5 ohm.

1. Then compile and run the code


EXERCISE #2

Modify the C== program to calculate and display the voltage across a circuit component when a
current of 2A is flowing, in the context of the given series resistance (R1= 1.5 ohm, R2= 20 ohm,
and R3= 4.5 ohm).

1. Then compile and run the code


EXERCISE #3

Revise Task 2 to compute and present the voltage drop across a circuit element, taking user-
provided values for R1,R2,R3 and current as inputs.

1. Then compile and run the code

You might also like