blob: 9c59022d30ccadc81672d355d8014eef2e1c852f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
clear
//Given
p=5*10**-8
m=9*10**9
r=0.15
//Calculation
E=m*2*p/r**3
E1=m*p/r**3
printf("\n (i) Electric field along AB is %0.2f *10**5 N/C",E*10**-5)
printf("\n (ii) Electric field along BA is %0.2f *10**5 N/C",E1*10**-5)
|