Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a C+ function called Series_ Res that calculates the resonant frequency W0

ID: 2080455 • Letter: W

Question

Write a C+ function called Series_ Res that calculates the resonant frequency W0, the bandwidth BW, the quality factor Q and maximum output power Pmax for an input resistance R(in Ohms), inductance L (in Henries), capacitance C (in farads ) and voltage V (in Volts). Use reference in your function headline to return the calculated outputs W0, BW, Q and Pmax to return the results of the function to the main program. Use the following formulas in your function: W0 = 1/sqrt (L*C); Q = W0*L/R; BW = W0/Q Pmax = V*V/R; Float Series_ Res (float R, float L, float C, float V, ???? ) } ??????? } After writing your function, use it in a main program that accepts the following input values: R = 660 Ohms L = 0.015 Henries C = 0.000000185 Farads V = 15 Volts And use reference with cout statements in the main program to get a print out of your results.

Explanation / Answer

(C++ Code)

#include <iostream>
#include <math.h>
using namespace std;

int main()
{
float R, L, C, V, W0, Q, BW, Pmax;
R = 660;
L = 0.015;
C = 0.000000185;
V = 15;
void Series_res(float R, float L, float C, float V, float& W0, float& Q, float& BW, float& Pmax);
Series_res(R,L,C,V,W0,Q,BW,Pmax);
cout << "Resonant Frequency = " << *(&W0) << endl;
cout << "Quality factor = " << *(&Q) << endl;
cout << "Bandwidth = " << *(&BW) << endl;
cout << "Maximum Output Power = " << *(&Pmax) << endl;
}
void Series_res(float R, float L, float C, float V, float& W0, float& Q, float& BW, float& Pmax)
{
W0 = 1/sqrt(L*C);
Q = (W0*L)/R;
BW = W0/Q;
Pmax = V*V/R;
}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote