summaryrefslogtreecommitdiff
path: root/1544/CH1/EX1.7/Ch01Ex7.sce
blob: 08d6a47d4f1ee15781c6cf2661365f4071960719 (plain)
1
2
3
4
5
6
7
8
9
10
// Scilab code Ex1.7: Pg.13 (2008)
clc; clear;
I = 5.5e-03;        // Electric current, A
R = 33000;          // Resistance, ohms
// From Ohm's law, V = I*R
V = I*R;            // Potential difference across resistor, V
printf("\nThe potential difference developed across resistor = %5.1f V",V)

// Result
// The potential difference developed across resistor = 181.5 V