blob: 39c446e25f5832fced39f7e686bc7753e70ccec3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
//Variable declaration
e=1.6*10**-19; //charge of electron(c)
epsilon0=8.85*10**-12; //permittivity(C/Nm)
r0=2.5*10**-10; //seperation(m)
//Calculation
PE=e**2/(4*e*%pi*epsilon0*r0); //potential energy(eV)
//Result
printf('potential energy is %0.3f eV \n',(PE))
|