%PROGRAM TO FIND OUT POTENTIAL DUE TO A LINE CHARGE %BETWEEN TWO POINTS %(or) %POTENTIAL DUE TO A COAXIAL CABLE %CAPACITANCE OF A COAXIAL CAPACITANCE clear all; close all; clc; float Eo=8.854*pow(10,-12); void main() { float C,n,q,v,pl,a,b,Er; clrscr(); printf("Enter values of q,pl,a,b,Er"); scanf("%f%f%f%f%f",&q,&pl,&a,&b,&Er); n=b/a; v=(pl*log(n))/(2*3.14*Eo*Er); C=q/v; printf("capacitance=%1.29f",C); getch(); } a = input('Enter the value of inner cylinder radius'); b = input('Enter the value of outer cylinder radius'); PL = input('Enter the value of Line charge density in couloms/metre'); epsilon_0 = input('Enter the value of free space permittivity'); epsilon_r = input('Enter the value of relative permittivity'); q = input('Enter the value of point charge'); V = (PL*log(b/a))/(2*pi*epsilon_0*epsilon_r); disp('Capacitance of Coaxial Cable') C = q/V