blob: 889d5ecc34387f105b3be61f8d7f8e72f88592e5 (
plain)
1
2
3
4
5
6
7
8
9
|
//Example 19.6
k=8.99*10^9;//Coulomb's constant (N.m^2/C^2)
Q=-3*10^-9;//Charge (C)
r=5*10^-2;//Distance (m)
V=k*Q/r;//Voltage (V)
printf('Voltage = %0.2f V',V)
//Answer varies due to round off error
//Openstax - College Physics
//Download for free at http://cnx.org/content/col11406/latest
|