fork download
  1. program Impedance;
  2. var R,L,C,Z,f,Xl,Xc:real;
  3. begin
  4. R:=1500;
  5. L:=500;
  6. C:=18;
  7. f:=100000;
  8. write('R = ');
  9. writeln(R:5:2);
  10. write('L = ');
  11. writeln(L:5:2);
  12. write('C = ');
  13. writeln(C:5:2);
  14. write('f = ');
  15. writeln(f:5:2);
  16. L:=L*0.001;
  17. C:=C/1000000000000;
  18. Xl:=6.28*f*L;
  19. Z:=sqrt(R*R+Xl*Xl);
  20. write('Z = ');
  21. writeln(Z:5:2);
  22. end.
Success #stdin #stdout 0s 5356KB
stdin
Standard input is empty
stdout
R = 1500.00
L = 500.00
C = 18.00
f = 100000.00
Z = 314003.58