Code:

#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#define PI 3.141592653589793238462
void get_values(double *, double*);
void get_capacitance(double*, int, double);
void get_inductance(double*, int, double);
void get_attenuation(double*,int, double, double);
void get_attdb(double*, double);
int main(void)
{
double inductor, capacitor;
int F;
double capacitance, inductance, attenuation, attdb;
get_values(&inductor, &capacitor);
printf("L = %lf, C = %lf\n", inductor, capacitor);
for (F=100;F<=1000;F=F+100)
{
printf("%i",F);
printf("\t");
get_capacitance(&capacitance,F,capacitor);
printf("%lf", capacitance);
printf("\t");
get_inductance(&inductance,F,inductor);
printf("%lf", inductance);
printf("\t");
get_attenuation(&attenuation,F, inductance, capacitance);
printf("%lf", attenuation);
printf("\t");
get_attdb(&attdb, attenuation);
printf("%lf", attdb);
printf("\t");
printf("\n");
}
system("PAUSE");
return 0;
}
void get_values(double *L, double *C)
{
printf( "Please, enter the required inductor value");
scanf("%lf", L);
printf("Please, enter the required capacitor value");
scanf("%lf", C);
}
void get_capacitance(double *capacitance, int frequency, double C)
{
*capacitance =(((1/(2 * PI * frequency * C))));
}
void get_inductance(double *inductance, int frequency, double L)
{
*inductance = (2 * PI * frequency * L);
}
void get_attenuation(double *attenuation,int F, double L, double C)
{
*attenuation = (1/(1-(2*PI*F*2*PI*F*L*C)));
}
void get_attdb(double *attdb, double att)
{
*attdb =(20 * log10(att));
}