Programming Qs
Programming Qs
plane. The program calculates and prints (i) the distance from the origin, (d) (ii) the angle of the vector
connecting the this point to the origin in degrees (angle) and (iii) and the quadrant in which this point is
located. Use the functions provided in math library.
+y
Y-axis
x
(x,y)
Quadrant Quadrant
2 1
y
d
an
gle
X-axis
-x +x
Quadrant Quadrant
3 4
-y
2-) Write a C program that read the amplitude of the voltage VR0, the amplitude and angle of
VXLtheta and the current I0. Determine and print the circuit impedance Z, phase angle (phi) and
the power factor. Enter and print all angles in degrees
VXL
XL
ZÐ phi
I
VR
3-) Write a C program that read the amplitudes of three voltages VR, VZ and VT and determine the
circuit impedance angle, phi. The program should print the appropriate message if the input voltages are
impossible for this case (e.g. VR+VZ>VT). Use the functions provided in C math library as you need.
VZ
Z
ZTÐ phi
VR
VT