summaryrefslogtreecommitdiff
path: root/3845/CH18/EX18.2/Ex18_2.sce
diff options
context:
space:
mode:
Diffstat (limited to '3845/CH18/EX18.2/Ex18_2.sce')
-rw-r--r--3845/CH18/EX18.2/Ex18_2.sce13
1 files changed, 13 insertions, 0 deletions
diff --git a/3845/CH18/EX18.2/Ex18_2.sce b/3845/CH18/EX18.2/Ex18_2.sce
new file mode 100644
index 000000000..788b63f50
--- /dev/null
+++ b/3845/CH18/EX18.2/Ex18_2.sce
@@ -0,0 +1,13 @@
+//Example 18.2
+Q=2.00*10^-9;//Charge (C)
+k=8.99*10^9;//Coulomb's constant (N.m^2/C^2)
+r=5*10^-3;//Distance (m)
+E=k*Q/r^2;//Electric field strength (N/C)
+printf('Electric field strength = %0.2e N/C',E)
+if E>0
+ printf('\nDirection of electric field points away from the charge')
+else
+ printf('\nDirection of electric field points towards the charge')
+end
+//Openstax - College Physics
+//Download for free at http://cnx.org/content/col11406/latest