can someone help me for this cuz I dont know what to do

#include<stdio.h>
#include<math.h>
/**RLC Circuit**/
void main()
{
 float v, r, l, c, f, i;
 long double Xc, Xl, Z, Vr, Vc, Vl;
 const double pi=3.1415926535;

 printf("Enter v=");
 scanf("%d",&v);
  printf("Enter r=");
 scanf("%d",&r);
  printf("Enter l=");
 scanf("%d",&l);
  printf("Enter c=");
 scanf("%d",&c);
  printf("Enter f=");
 scanf("%d",&f);

 Xc=(1/(2*pi*f*c));

 Xl=2*pi*f*l;

 Z=(sqrt(pow(2,r)+pow(2,abs(Xl-Xc))))*(-atan2((abs(Xl-Xc)),r));
  printf(" Z =%d\n ",Z);

 i=v/Z;

 Vr=i*r;
  printf("Vr=%d\n ",Vr);
 Vc=i*Xc;
  printf("Vc=%d\n ",Vc);
 Vl=i*Xl;
  printf("Vl=%d\n ",Vl);
}

can someone help me for this cuz I dont know what to do

#include<stdio.h>
#include<math.h>
/**RLC Circuit**/
void main()
{
float v, r, l, c, f, i;
long double Xc, Xl, Z, Vr, Vc, Vl;
const double pi=3.1415926535;

printf("Enter v=");
scanf("%d",&v);
printf("Enter r=");
scanf("%d",&r);
printf("Enter l=");
scanf("%d",&l);
printf("Enter c=");
scanf("%d",&c);
printf("Enter f=");
scanf("%d",&f);

Xc=(1/(2*pi*f*c));

Xl=2*pi*f*l;

Z=(sqrt(pow(2,r)+pow(2,abs(Xl-Xc))))*(-atan2((abs(Xl-Xc)),r));
printf(" Z =%d\n ",Z);

i=v/Z;

Vr=i*r;
printf("Vr=%d\n ",Vr);
Vc=i*Xc;
printf("Vc=%d\n ",Vc);
Vl=i*Xl;
printf("Vl=%d\n ",Vl);
}

What do you exactly want? This is a simple program which finds the potential diff. between all the components of the LCR ckt.

Please specify your question, and code you progs.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.