You are on page 1of 1

#include <stdio.

h>
#include <stdlib.h>
#include <math.h>
int main()
{
const L=30*pow(10,-3),R=2.2*pow(10,3),C=10*pow(10,-9);
float omega;
float ratio;
float f;
ratio=1/(sqrt(pow((1-omega*omega*L*C),2)+(omega*omega*R*R*C*C)));
printf ("This program calculates the voltage transfer function H(w) for the
interval of 20k<=w<=250k.\n");
printf ("Freq(Rad/s)\tRatio.\n");
for(omega=20*pow(10,3); omega<=250*pow(10,3); omega+=20*pow(10,3))
{
printf ("%.4f\t\t%.4f.\n", omega, ratio);
}
}

You might also like