Q1) Write a C program that calculates the given output parameters for the serial and parallel circuits shown in Fig. 1. The program will ask to the user to select a choice and if the user enters 'l'...


Please solve quickly and step by step


Q1) Write a C program that calculates the given output parameters for the serial and parallel<br>circuits shown in Fig. 1. The program will ask to the user to select a choice and if the user enters<br>'l' serial circuit parameter will be calculated and if the user enters '2' parallel circuit parameters<br>will be calculated. Use while repetition structure and the loop will continue until the choice is<br>entered as 0'. Vs, R1, and R2 will be taken from the user as inputs and the following output<br>parameters (I, Req, I1, I2, V1, V2, P1, and P2) will be calculated using the formulas given in the<br>figure and printed on the screen for each iteration. (Hint: Use switch/case for the selection).<br>R1<br>Vs<br>R2<br>Vs:<br>R1<br>R2<br>Fig 1. (i) Serial Circuit (ii) Parallel Circuit<br>Serial Circuit<br>Parallel Circuit<br>Req = R1 + R2<br>Iş = Vs/Req<br>V, = (V, × R1)/(R, + R2)<br>V2 = (Vs × R2)/(R1 + R2)<br>I = I2 = I,<br>P = (V,)²/R1 , P2 = (V2)² /R2<br>Reg = (R1 x R2)/(R1 + R2)<br>Iş = Vs/Req<br>I = (I, × R2)/(R1 +R2)<br>I2 = (Is × R1)/(R1 + R2)<br>Vị = V2 = V;<br>P, = (V.)?/R1 , P2 = (V2)² /R2<br>%3D<br>%3D<br>

Extracted text: Q1) Write a C program that calculates the given output parameters for the serial and parallel circuits shown in Fig. 1. The program will ask to the user to select a choice and if the user enters 'l' serial circuit parameter will be calculated and if the user enters '2' parallel circuit parameters will be calculated. Use while repetition structure and the loop will continue until the choice is entered as 0'. Vs, R1, and R2 will be taken from the user as inputs and the following output parameters (I, Req, I1, I2, V1, V2, P1, and P2) will be calculated using the formulas given in the figure and printed on the screen for each iteration. (Hint: Use switch/case for the selection). R1 Vs R2 Vs: R1 R2 Fig 1. (i) Serial Circuit (ii) Parallel Circuit Serial Circuit Parallel Circuit Req = R1 + R2 Iş = Vs/Req V, = (V, × R1)/(R, + R2) V2 = (Vs × R2)/(R1 + R2) I = I2 = I, P = (V,)²/R1 , P2 = (V2)² /R2 Reg = (R1 x R2)/(R1 + R2) Iş = Vs/Req I = (I, × R2)/(R1 +R2) I2 = (Is × R1)/(R1 + R2) Vị = V2 = V; P, = (V.)?/R1 , P2 = (V2)² /R2 %3D %3D

Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here